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
  • 6
    You need some double-quotes around your mv arguments, in case there are spaces in the name Commented Oct 3, 2018 at 12:52
  • I needed to replace all files *_spec.rb to *_controller_spec.rb and your solution worked for me. Thanx. Commented Sep 21, 2019 at 11:36
  • 2
    For anyone wondering, yes this is recursive. Commented Jul 17, 2020 at 11:23
  • It worked. however it is matching all other files and trying to rename/mv files. I.e mv: './jhon-654x1024-100x70.jpg' and './jhon-654x1024-100x70.jpg' are the same file. Probably need little more tweaking to skip trying for files which are outside of match Commented Sep 12, 2021 at 10:10
  • getting: new target ....... is not a directory for each file it tries to process. Commented Jan 11, 2022 at 23:56