13 - Quickly rename files

Renaming batches of poorly named files can be facilitated using command-line tools but first we need to clear up confusion between the linux rename utility and the Perl rename script.

When I start working in a new environment where I lack permissions, getting the correct version of the rename function working is essential. What's the difference? Well a big one is that the linux rename utility command doesn't incorporate the use of regular expressions to search for and manipulate filenames.

To see which version of rename that you have, at the command-line, do:

$ which rename

If you see:

/usr/bin/rename

then this is probably a link to linux rename utility. If you do:

$ man rename

This will show something like this: