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*

7
  • There are two renames, the perl one (aka prename, but called rename by default in Ubuntu at least), and the other one that doesn't use regex (known as rename on Arch and Red Hat). Also, -execdir is preferred to -exec (see man find). Finally, doesn't this command move the files, not copy them? Commented Jun 16, 2014 at 15:15
  • @Sparhawk, yes that's why I specified prename. Although I missed the 'copy` part in the question. Commented Jun 16, 2014 at 15:17
  • Ah okay (was that an edit?). Perhaps I just read it wrong. Commented Jun 16, 2014 at 15:17
  • @Sparhawk, no edit. Good call on the move vs copy though I have added an updated solution now. Commented Jun 16, 2014 at 15:35
  • 1
    @Tim, updated with the pax solution, it has its own find/replace option. Commented Jun 16, 2014 at 15:57