How to rename a certain prefix in multiple files?
You can use the following command:
find -name "*-old-*" -exec rename 's/-old-/-new-/' {} \;
This searches for files containing -old-
recursively beginning in your current directory and renames them by replacing the -old-
with -new-
.
Note: replacing old
may be enough, but I included the -
in case, there is a second old
in the name (like my-old-Folders.doc).