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.

1
  • See the other answers using find, you should include the -depth flag to find. Otherwise you may rename directories before the files in the directories. Same issue with dirname and basename so you don't try to rename dir one/file two in one step. Commented Jul 20, 2021 at 17:52