Friday, January 02, 2009
Renaming multiple files in UNIX
Just thought I’d put it out there for those in the same position as I was:
for i in *old*; do mv $i `echo $i | sed 's/old/new/'`; done
This renames all file names that have “old” in it to “new”. Be careful between the two different kinds of tick marks. One is next to the number 1 on your keyboard, and the other is next to the enter key.


There’s also mmv, if you happen to be on a *NIX-alike that has it.