rename Command Examples

Rename multiple files. Note: this page refers to the command from the util-linux package. For the Perl version, see file-rename or perl-rename. Warning: This command has no safeguards and will overwrite files without prompting. More information: https://manned.org/rename.

rename {{foo}} {{bar}} {{*}}

rename -vn {{foo}} {{bar}} {{*}}

rename -o {{foo}} {{bar}} {{*}}

rename {{.ext}} {{.bak}} {{*.ext}}

rename {{''}} {{'foo'}} {{*}}

rename {{foo}} {{foo00}} {{foo?}} && rename {{foo}} {{foo0}} {{foo??}}