MRENAME(1)
β¨ MRENAME β¨
okay bestie, gather round, because we're talking about mrename β the Debian manual page for the mrename command, which is literally a program to rename files. π
π NAME π
mrename β it's a program. To rename files. That's the whole job description, and honestly? Iconic. π
π¦ SYNOPSIS π¦
mrename 'pattern' prefix [option]
πΈ DESCRIPTION πΈ
So this page is the brief lil rundown of the mrename command. Real talk: it was written for the Debian GNU/Linux distribution, because the original program straight-up does not have a manual page. Not one. Zero. So we made one for it. You're welcome. π
mrename is a tool for easy and automatic renaming of many files at once β like, a whole crowd of them. No clicking around, no manual labor, we love that for us.
- The
'pattern'is the pattern used to search for the files you wanna rename. And yes, you gotta quote it, because otherwise bash will resolve it beforemrenameever gets a chance to see it, and then everything is chaos. π Quote your patterns. Protect your patterns. π«Ά prefixis the prefix that gets added to the name of each file.
The two alternative options β one for copying files into the new name and one for moving them β are explained below in the OPTIONS section, don't worry, we got you. β¨
Heads up though: all parameters are needed. All of them. No skipping. And you have to stay and launch the script in the same directory as the files you want to rename β no wandering off to other directories. Also, the program should be able to write in this directory, so make sure permissions are giving what they need to give. π₯
π OPTIONS π
There are only the following three options. Three. That's it. Minimalist queen behavior. π
-cβ the-coption will copy each file with the new filename. Original stays, new one shows up. Two files, one vibe. π¦-mβ the-moption will move each file in the new filename. So it's a rename-rename, not a copy. πΈ-hβ displays help. Classic. When in doubt,-hit out. π
π EXAMPLE π
Picture this: you've got a directory with two jpeg images, prof.jpg and forp.jpg, and you want to add them a prefix like item0, item1, etc. β so they come out looking like item0prof.jpg, item1forp.jpg, etc.
Do this:
cd /path/to/the/images
mrename '*.jpg' item -c
That's the one to copy each matching file into another file with the new name. π
mrename '*.jpg' item -m
And that's the one to rename each file without keeping a copy with the previous name. periodt. β¨
π Word-Wide-Web π
http://alfalinux.sourceforge.net/mrename.php3
π AUTHOR π
Giancarlo -rofus- Erra e-mail: rofus@mindless.com
This manual page was written by Dr. Guenter Bechly <gbechly@debian.org>, for the Debian GNU/Linux system (but may be used by others). It is distributed under the GPL just like mrename itself. π«Ά
and that's the whole page bestie, no cap, every last detail accounted for π β this was the MRENAME(1) page from the General Commands Manual, and the version we're looking at is dated October 22, 2000. main character energy for a manual page fr fr. πβ¨
π¦ where this page comes from
- debian bookworm: mrename 1.2-14 Β· GPL-2.0-only
- debian trixie: mrename 1.2-17 Β· GPL-2.0-only
- ubuntu jammy: mrename 1.2-14 Β· GPL-2.0-only
- ubuntu noble: mrename 1.2-15 Β· GPL-2.0-only
- ubuntu questing: mrename 1.2-17
- ubuntu resolute: mrename 1.2-17build1 Β· GPL-2.0-only
- ubuntu stonking: mrename 1.2-17build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms