Batch renaming (one-off job)
1. put the filenames in a file.
find . -name '*.gif' -o -name '*.jpg' -o -name '*.png' -print >/tmp/f
find . -name '*.gif' -o -name '*.jpg' -o -name '*.png' -print >/tmp/f
2. get the file in a good editor, e.g. vi(m).
vi /tmp/f
3. edit the file to get the commands you want
(e.g :%s/pattern/replace/)
4. run the file
sh /tmp/f
Comments