prename
TLDR
Rename with Perl expression
SYNOPSIS
prename [-n] [-v] [-f] expression files
DESCRIPTION
prename (Perl rename) renames files using Perl expressions. It provides powerful pattern-based renaming.
The s/// substitution operator replaces text. Global flag g replaces all occurrences.
Transliteration y/// transforms character sets. Useful for case changes.
Perl code can use $_ for filename. Complex transformations are possible.
Dry run shows what would happen. Always test patterns before applying.
Multiple expressions chain transformations. Each -e adds another operation.
PARAMETERS
-n, --no-act
Dry run, show changes.-v, --verbose
Show renames.-f, --force
Overwrite existing files.-0, --null
Null-separated input.-e EXPR
Expression to apply.-E EXPR
Like -e but without warnings.
CAVEATS
Perl syntax required. May conflict with util-linux rename. Use full path if needed.
HISTORY
prename was written by Larry Wall (creator of Perl) and is often distributed as rename with Perl. It's distinct from the simpler util-linux rename command.


