Forrest logo
back to context overview

rename

List of commands for rename:

  • rename:tldr:2093a rename: Rename a group of increasingly numbered files zero-padding the numbers up to 3 digits.
    $ rename ${foo} ${foo00} ${foo?} && rename ${foo} ${foo0} ${foo??}
    try on your machine
    explain this command
  • rename:tldr:423ef rename: Change file extensions.
    $ rename ${-ext} ${-bak} ${*-ext}
    try on your machine
    explain this command
  • rename:tldr:54bba rename: Do not overwrite existing files.
    $ rename -o ${foo} ${bar} ${*}
    try on your machine
    explain this command
  • rename:tldr:5fd5b rename: display which renames would occur without performing them.
    $ rename -vn ${foo} ${bar} ${*}
    try on your machine
    explain this command
  • rename:tldr:df7c0 rename: Replace `from` with `to` in the filenames of the specified files.
    $ rename 's/${from}/${to}/' ${*-txt}
    try on your machine
    explain this command
back to context overview