Rename Multiple Files In Debian or *nix

1:04 pm on November 10th, 2011 | Linux, SysAdmin, Tech

Obviously the n00b trick of trying to do

mv oldName* newName*

does not work.

Interestingly I just found that Debian has a “rename” command that supports perl regular expressions. So this would work in case you were wondering how:

rename 's/^oldName/newName/' oldName*

Check your man pages before you attempt this on a different *nix system. Different rename binaries might have different functionality.

Leave a Reply