1

This question already has an answer here:

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!

marked as duplicate by Michael Homer, Kusalananda, ilkkachu, roaima, muru May 13 '17 at 12:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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.