Select Page

Rename multiple files and remove some characters

by | 8 April 2019 | Linux | 0 comments

Sometimes you have to rename multiple files and remove some characters. For instance After compressing images you have multiple jpg files with “min” characters:

file1.jpg -> file1.min.jpg
file2.jpg -> file2.min.jpg
file3.jpg -> file3.min.jpg

In this case we want to remove part of file name – “min.”. In order to do it we will use rename command:

rename s/min\.// *.jpg

This command will remove “min.” from every jpg file (*.jpg). If you want to remove from any file in the directory, type this:

rename s/min\.// *




Follow us