I wish to recursively go through the folders of a directory structure and copy any .jpg I find into another directory.
I think I had the wrong idea with:
cp -R photos/*.jpg /cpjpg
How can I do this from the command line in Ubuntu?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
This preserves the directory structure:
rsync -av --include='*.jpg' --include='*/' --exclude='*' SRC DST