Linux Rename files with Prefix

To rename all .jpg to prefix*.jpg in the current directory:

In a shell script

for filename in *.jpg; do mv "$filename" "prefix_$filename"; done;
 

You can use rename utility to rename multiple files by a pattern. For example following command will prepend string MyVacation2011_ to all the files with jpg extension.

rename 's/^/MyVacation2011_/g' *.jpg

or

rename <pattern> <replacement> <file-list>

rename 2018-10-03 3 *.mp3