Renaming files that contain different numbers using rename command-Linux
I have multiple files that have the following format: (note that file corresponds to each file name which is not common).
File1_S20.tab File2_S25.tab File3_S40.tab
I want to rename them all so they become:
File1 File2 File3
Basically removing the _S$$.tab part from all the files.
For renaming files, I usually use the rename command as follows: rename # somethingelse *.tab (replace # by somethingelse). But the only trouble I’m have is each file has different number after the S.
• 43 views
Read more here: Source link