Mike Conigliaro

Mass File Rename with Linux

When people ask me why I love Linux so much, I tell them it’s the little things; like being able to do very simple mass file renaming on the command line:

rename "s/foo/bar/" *.baz

The first parameter is a Perl expression. The second is a file glob. This command will replace the string foo with the string bar in all filenames ending in .baz.

blog comments powered by Disqus