1

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 \;

migrated from stackoverflow.com May 26 '12 at 15:49

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

  • 4
    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
  • Wouldn't it make more sense to move the mp3's to a place which exists on OSX already? – nohillside May 26 '12 at 15:58
  • 1
    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
  • 2
    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
  • Perhaps you omitted the space ahead of \; That yields the error: find: -exec: no terminating ";" or "+". – Casey Watson Aug 27 '14 at 3:47

You must log in to answer this question.

Browse other questions tagged .