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
  • 10
    rename changes the first occurrence, so better make that rename .txt .text, but this still won't always work (e.g. it renames foo.txtx.bar.txt to foo.textx.bar.txt). Commented Aug 29, 2011 at 21:28
  • 26
    It should be noted that not all systems have the same version of rename; on Debian and friends, the rename command is actually perl-rename and uses perl regexes. For that, the equivalent command would be: rename 's/.txt/.text/' *.txt. People should check the man rename on their system to find out which one they have. Commented Nov 13, 2013 at 15:12
  • 1
    @evilsoup That's the case for OSX, thx Commented Aug 17, 2015 at 19:23
  • This also works on Cygwin (Windows) Commented Apr 12, 2017 at 9:36
  • Replace rename with rename.ul on Ubuntu/Debian. Commented Jun 2, 2022 at 12:57