Copy files recursively from directories into an output directory

If you need to copy file names recursively from a directory tree into a unique single output directory, then you can use the following command:

find ./*/ -type f -iname "*.jpg" -exec cp {} /output/dir/ ‘;’

Advertisement

Did you like it?

No comments yet.

Leave a Comment