查找系统中的所有图像,然后将它们复制到文件夹中

Look for all images in the system then copy them to a folder

这是我使用的代码。

find . -regex '.*\(jpg\|jpeg\|png\|gif\)' \! -path './ToutesImages/*' -exec echo cp -t ToutesImages {} +

This is the terminal output

因为它向我显示了系统中的所有图像并回显了我的代码,所以我猜 -exec echo cp -t ToutesImages {} + 是错误的。有谁知道我该如何改进它?

File manager. Just in case

echo 是干货 运行,因此您可以预览将要执行的命令。如果它看起来像是一组正确的文件,则将其删除以实际执行复制。