Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 2
    Not all files were gone. At least one .mp3 should be there with the name 90, it could have been one for which you did not have a backup. Commented Nov 21, 2014 at 8:38
  • 2
    Heh, you've got a cynical sense of humor, you nut you! :-P Well, that was the file called the "one single file" in bold print in my OP. :) Commented Nov 21, 2014 at 8:45
  • 2
    mv isn't the problem here, technically, it doesn't know that you are moving a series of files. You are running mv one time for each file. That's how find -exec ; works. If you had used find -exec + (as in some of the comments) mv would have screamed as soon as it got more than one argument. Commented Nov 23, 2014 at 12:49
  • Though running mv for each single file might seem a bit less thought-out at first, it will (as I had said previously) be the only sane solution once source files are scattered among various subdirectories. That in my test-case, source files were all in one directory does not mean that it's my actual test case. It's in fact just a simplification, because I may easily elaborate on that on my own later. Plus, it makes questions less time-consuming to read due to their reduced length. :) Commented Nov 23, 2014 at 13:03
  • Why would you expect mv to require that the destination exists? mv oldfile newfile is the way to rename a file, and it's silly to expect newfile to exist already and be a directory. Commented Nov 26, 2014 at 19:29