

Install rename on CentOS and Fedora sudo yum install prename Install rename on Ubuntu and Debian sudo apt install rename If you don’t have this version installed on your system, you can easily install it using the package manager of your distribution. In this tutorial, we will be using the Perl version of the rename command. There are two versions of the rename command with different syntax. This command is more advanced than mv as it requires some basic knowledge of regular expressions. The rename command is used to rename multiple files.

depth -name "*.html" -exec sh -c 'f=" is the name of the file currently being processed.Īs you can see from the examples above, renaming multiple files using the mv command is not an easy task as it requires a good knowledge of Bash scripting. html files in the current directory by changing the. The following example shows how to use the Bash for loop to rename all. The mv command can rename only one file at a time, but it can be used in conjunction with other commands such as find
