When working in Linux, the need to rename multiple files at once often arises. Basic tools like mv and rename can handle this task, but they require writing complex commands or scripts for batch processing multiple files. If you need a quick and convenient way to rename multiple files simultaneously, the powerful tool mmv comes to the rescue. It significantly simplifies the process and allows you to set flexible filename templates.
mmv stands for multiple move. It is a utility designed for bulk renaming, moving, and copying files using powerful templates and patterns. Unlike mv, which operates on a single file at a time, mmv allows you to rename groups of files according to specified rules.
Key Features of mmv:
Using templates for automatic filename modification.
→ Adding, removing, and replacing parts of filenames.
→ Support for wildcard characters and regular expressions.
→ Recursive renaming of files in subdirectories.
→ Flexibility when working with different file formats.
→ Ability to revert changes if something goes wrong.
mmv [options] <source_pattern> <destination_pattern>
→ <source_pattern> – A pattern to select files that need to be renamed.
→ <destination_pattern> – The format for the new filenames.
Simple Example:
Rename all .txt files to .md:
mmv '*.txt' '#1.md'
Here, #1 represents the part of the filename that matches the * (asterisk) in the pattern.
Although mmv is a powerful command-line tool, there are also graphical utilities that allow bulk renaming of files through a user-friendly interface:
1. KRename (KDE)
KRename is a powerful file renaming tool for the KDE environment. It allows renaming files based on templates, adding prefixes and suffixes, replacing characters, and much more.
Installation:
sudo apt install krename # For Debian/Ubuntu
sudo dnf install krename # For Fedora
2. Métamorphose
This cross-platform open-source tool supports flexible file renaming using regular expressions.
Installation:
sudo apt install metamorphose2
3. Bulk Rename Utility (Windows/Linux via Wine)
If you're looking for something similar to the Windows-based Bulk Rename Utility, you can run it on Linux via Wine:
Installation:
sudo apt install wine
wine BRU_Setup.exe
Bulk renaming files in Linux doesn’t have to be complicated and time-consuming. mmv offers flexible options for modifying filenames, eliminating the need for complex scripts or manual renaming. If you prefer a graphical interface, tools like KRename and Métamorphose provide similar functionality with an easy-to-use UI.
Use mmv or GUI utilities to speed up and automate file management, especially when dealing with large amounts of data!
Apply the discount by inserting the promo code in the special field at checkout: