]> git.ipfire.org Git - thirdparty/util-linux.git/commit
rename: add --all and --last parameters
authorTodd Lewis <todd_lewis@unc.edu>
Thu, 15 Jul 2021 04:15:55 +0000 (00:15 -0400)
committerTodd Lewis <todd_lewis@unc.edu>
Thu, 15 Jul 2021 04:15:55 +0000 (00:15 -0400)
commita2b23d3a91f8f50a64008ba5cda0a71ed020d1db
treef606b0e5683e85525026756902170864206eff70
parentbe199d34f2698119ea03b4d583421cabcd565980
rename: add --all and --last parameters

Renaming files with rename often involves multiple passes in order
to, say, replace all spaces with underscores because traditionally
rename only replaces the first occurrence of the expression. The
--all parameter makes this task simple.

With the addition of --last, rename becomes much safer to use when
replacing file extensions, whereas before it would mangle a file
which had its extension also embedded elsewhere in its name.

The implied --first, together with --all and --last, round out the
common cases for renaming files.
bash-completion/rename
misc-utils/rename.1.adoc
misc-utils/rename.c
tests/expected/rename/basic
tests/ts/rename/basic