Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I want to copy all files in ~/Desktop with the extension .jpeg to my flash drive.

How can I do this in the terminal?

share|improve this question
add comment

2 Answers

cp ~/Desktop/*.jpeg /Volumes/flashdrive/

will copy all of the files on the current user's desktop with extension ".jpeg" to the drive named "flashdrive".

share|improve this answer
add comment


find /source/directory -iname \*.jpeg -exec cp {} /destination/directory/ \;

Where directory is would be your /Users/*username*/Desktop/ directory.

Answer provided from Stack Overflow

share|improve this answer
a simple cp ~/Desktop/*.jpeg /flashdrive is slightly less scary for a Terminal newbie... –  MattDMo Jun 20 '13 at 14:36
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.