Debian Strech (2016) deprecated the use of
prename in favor of
is the exact same command but with a different name.
prename name was choosen to distinguish between the rename Perl script and the Linux Kernel utility
of the same name. That later is now known as
Confusing ? Still not sure which version of
rename is already installed on your computer ?
As a simple trick, if in the very first line of the
man rename page you see "Perl", this
is the command described in this video. Otherwise, you probably have the Linux Kernel rename utility (which
of course uses a totally different syntax ;)
I encourage you to download the files used on the video so you will be able to try the same commands as me on your own system.
prenameis not available on my system?
First, use your package manager to check if
prename is available in your distribution.
Some distributions have a dedicated prename package. Others install it as part of the
Perl is required to use
prename as that later is a few line Perl script (i.e.: a program written in the Perl language).
prename using the precedure bellow, you need to have access to the
sudo command. It is very probably
already installed on your system. Once again, if it is not, install it using your package manager.
If really you can’t find the
prename ` script for your distribution, download it from my gist account
and save it as prename into your home directory. In my case, this is `/home/yesik.
Open your terminal and type the following commands :
chmod +x prename
sudo cp prename /usr/local/bin
Check you installation using the
which command :
which prename || echo Missing
# ^-- if this will display /usr/local/bin/prename then is all went well
# if not, try to verify you didn’t miss any step or just contact me.
This video is clearly aimed toward new shell users. The video was designed on a Linux system and using the Bash shell. But the features demonstrated here are generic enough to work with other shells and/or other Unix-like OS (*BSD, MacOSX, …).
You should have a working Unix-like system.
You should be confortable with your file manager/file explorer.
Perl should be installed on your system.