Let’s say we have these files:
ls
to_be_renamed_1.txt
to_be_renamed_2.txt
to_be_renamed_3.txt
Use the rename
command with your substitution pattern:
rename 's/to_be_renamed/got_new_name/' *.txt
See the new names now:
ls
got_new_name_1.txt
got_new_name_2.txt
got_new_name_3.txt