rename
util is not very "standard". Each distro ships with a different rename
tool. For instance, here on Gentoo, rename
is from sys-apps/util-linux
package and does not support regex.
Hamish Downer suggested mmv
, it seems useful, specially for use inside scripts.
On the other hand, for the general case, you might want renameutils. It has qmv
and qcp
commands, which will open a text editor of your choice (my preference: Vim) and allow you to edit the destination filenames there. After saving and closing the editor, qmv
/qcp
will do all the renaming.
Both mmv
and qmv
are smart enough to rename files in correct order and also to detect circular renames, and will automatically make a temporary file if needed.