0

So I am aware that we have to end find -exec commands with ; or +, but I cannot fathom why is this not working:

find . -type f -name "*.mp3" -exec mv {} . +

when this is working

find . -type f -name "*.mp3" -exec mv {} . \;

My first suspect is the plus sign is might have been unescaped, but \+ doesn't work either. Then I thought that mv might have interpreted + for something else, but I couldn't figure out how to work around it. Any help will be greatly appreciated!

  • What is this error? – Michael Homer May 13 '17 at 10:19
  • Well, at a guess, this - not a duplicate. – Michael Homer May 13 '17 at 10:21
  • This is documented in the find manual for the -exec option, but unfortunately not clearly enough in the GNU find manual. – Kusalananda May 13 '17 at 11:13

Browse other questions tagged or ask your own question.