rename command in Linux is used to rename the named files according to the regular expression perlexpr. It can change the name of the multiple files. If the user will not specify any file names on the command line with this command then it will take the file name from the standard input.
rename [options] expression replacement file...
- rename -s: This option renames the files ignoring the symbolic links.
rename -s 's/root/new/' sym.png
- rename -v: This option is used to show which files is being renamed, if there is any.
rename -v 's/jpeg/png/' *.jpeg
- rename -n : This option comes into play when the user wants to see only the final change.
rename -n 's/png/jpeg/' *.png
- rename -o : This option will not going to overwrite the existing files.
rename -o 's/jpeg/png/' *.jpeg
- rename -V: This option will show the version information and exit.
rename -V 's/jpeg/png/' *.jpeg
- rename -help : This option will going show the help message and exit.