Believe it or not, there is a 'rename' command (you don't always have to use mv!!)
rename "regex-rule" files
Rename command syntax
rename oldname newname *.filesFor example rename all *.foo file as *.bar, enter:
$ rename .foo .bar *.fooExamples: Linux Rename Multiple Files
The regex command is as follows<start>/<string to get replaced>/<string to replace it with>/g <replace all vars>So removing all blank space with rename command:
$ rename "s/ *//g" *.mp3To remove .jpg file extension, you write command as follows:
$ rename 's/\.jpg$//' *.jpgTo convert all uppercase filenames to lowercase:
$ rename 'y/A-Z/a-z/' *To Remove a String from a filename:
$ rename 's/mystring//g' *
Read the man page of rename command for more information:
man rename