Files
oam/knowledge base/rename.md
2023-01-08 13:23:06 +01:00

627 B

rename

Note: this page refers to the command from the util-linux package on Linux or Homebrew's rename package.

TL;DR

# Show what would change without changing anything (dry run).
rename -vn foo bar *

rename -n 's/^(\d{4}-\d{2}-\d{2})  (.*)$/$1  addition  $2/' 'file'
rename -n 's/^What.*(\d{4}-\d{2}-\d{2}) at (\d{2}\.\d{2}.\d{2}\..*)/$1 $2/' *

Sources