Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does any know why the -exec does not work on mac os x lion terminal?

It works on linux and other variants but not on mac os x

find / -iname "*.mp3" -exec mv {} /mnt/mp3 \;
share|improve this question

migrated from May 26 '12 at 15:49

This question came from our site for professional and enthusiast programmers.

It works fine for me, although /mnt/mp3 isn't a location you're likely to find on OS X; if "mp3" is a mounted volume, generally it'll be mounted at /Volumes/mp3. – Gordon Davisson May 26 '12 at 15:55
Thanks Gordon. I created the /mnt directory manually .. – user23281 May 26 '12 at 15:57
Wouldn't it make more sense to move the mp3's to a place which exists on OSX already? – patrix May 26 '12 at 15:58
Patrix, I know that but my point is that the command some odd reason doesn't work on my mac os x lion. The issue is not where the destination is. I'll see if I can post the error message.. – user23281 May 26 '12 at 16:00
I concur with @GordonDavisson – that command works just fine as is. Are you certain that you have write rights to /mnt/mp3? – kopischke May 26 '12 at 16:46

Your Answer


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