更新时间:2023-11-27 23:01:04
你正在寻找扁平化目录的方法
you are looking for ways to flatten the directory
find /images -iname '*.jpg' -exec cp --target-directory /newfolder/ {} ;
find
所有文件iname
以不区分大小写的名称模式.cp
复制一次到名为 /newfolder/
的 --target-directory
.{}
将列表从find
展开成/dir/file.jpg/dir/dir2/bla.jpg
的形式.
find
all files iname
in case insensitive name mode.cp
copy once to --target-directory
named /newfolder/
.{}
expand the list from find
into the form of /dir/file.jpg /dir/dir2/bla.jpg
.