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.

7
  • 2
    Did you try depth-first search? You can do that by supplying the -depth flag to find. Commented Dec 12, 2020 at 7:04
  • Yes now find . -depth -exec rename 's/^ *//' {} + works. Still find . -depth -exec rename 's/^ *//' {} + not working. Commented Dec 12, 2020 at 7:47
  • @blueray You just said that a command was and was not working, at the same time. Commented Dec 12, 2020 at 9:07
  • Also, at no point do you actually say what "not working" means. Does it produce errors? What are those errors? Does it rename files in the wrong manner? Not at all? Does your filenames contain tab characters? Commented Dec 12, 2020 at 9:08
  • @Kusalananda the command runs without any error. But it does not remove the leading whitespace. Commented Dec 12, 2020 at 9:55