How To Rename Multiple Files In Linux?

Renaming multiple parts always seems a difficult job and renaming can be done only senior system administrator. Actually it is very easy as long as the situation is not so complex.

Rename Command

Rename command will change files names according to the rules specified. Rename command also supports perlexpr. Rename is also know with rename.ul in some distributions but recently rename command can be used.

1

$rename".jpg"".jpeg""*.jpg"

Rename files specified *.jpg and change .jpg to the .jpeg

Change Uppercase Filenames To Lowercase

Another useful usage of rename is converting names to upper and lowercase we will see in this example how to convert uppercase to lowercase

1

$rename'y/A-Z/a-z/'*

Change Lowercase File Names To Uppercase

In contrast to the previous example we will convert lowercase names to the uppercase.

1

$rename'y/a-z/A-Z/'*

Using Mmv

Mmv is another tool use to move, copy, append and link multiple files with wildcard patterns. Mmv makes these operations safely without harming any files. Mmv supports big files but don not support sparse files for append.