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 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.
$ 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
$ 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.
$ rename 'y/a-z/A-Z/' *
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.
$ mmv '*.jpeg' '#1.jpg'
- *.jpeg is the files those will be selected for rename
- #1 is the name part of the files select and do not includes extension
- .jpg is the extension will be added