I {heart} UNIX! In addition to the 'find' commend, I just found another very useful command that is now my second favorite!
rename
The rename command renames files according to a pattern, such as:
I needed to rename almost 800 files from a format like "2007_XXXXXXXXXXXXXX.php" to use a hyphen (dash) instead of the underscore after the year - such as "2007-XXXXXXXXXXXXXX.php". I did this with the following for each year (there's probably a way to rename all years at once, but I didn't have a backup and didn't want to screw it up):
rename 2007_ 2007- 2007*.php
which means "change the string 2007_ to 2007- in all filenames resulting from 2007*.php".
Worked like a charm!!!
I am not responsible for any problems you may encounter. Backup all files first.










Cheers for this, didn't realise the command existed! From looking at the man page it appears you can use the `-n` flag to preview the changes the command makes before applying them.