linux rename all files code example
Example 1: rename multiple files linux
rename 's/old-name/new-name/' files
Example 2: rename all files starting with in linux
$ mmv '*abc*' '#1xyz#2'
Example 3: bash rename multiple files pattern
for f in *.jpg; do mv "$f" "$(echo "$f" | sed s/IMG/VACATION/)"; done
Example 4: bash rename multiple files
rename search_string replacement_string files
badly_name_file_1.txt
badly_named_file_1.txt
badly_named_file_2.txt
badly_named_file_3.png
rename txt png *txt
badly_name_file_1.png
badly_named_file_1.png
badly_named_file_2.png
badly_named_file_3.png
rename named speled badly*
badly_name_file_1.txt
badly_speled_file_1.txt
badly_speled_file_2.txt
badly_speled_file_3.png