There are times when you want to rename multiple files by issuing a small modification on all of them. For this case the script rename is quite handy.
rename 's/tag_50_name_ypthon/tag_50_name_python/' tag_50_name_*
Let’s break it down:
-
The first argument follows a familiar syntax with many editors to replace text, it will find the first given text
tag_50_name_ypthonand replace it withtag_50_name_python. -
The second argument will match the files with the given regex and apply the previous command.
There are many other things rename can do, changing text to
upper case, lower case and even sanitizing it are supported.