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 before mrename ever gets a chance to see it, and then everything is chaos. 😭 Quote your patterns. Protect your patterns. 🫢
  • prefix is 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 -c option will copy each file with the new filename. Original stays, new one shows up. Two files, one vibe. πŸ¦‹
  • -m β€” the -m option will move each file in the new filename. So it's a rename-rename, not a copy. 🌸
  • -h β€” displays help. Classic. When in doubt, -h it 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. πŸŽ€βœ¨