mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Added rename to the KB
This commit is contained in:
18
knowledge base/rename.md
Normal file
18
knowledge base/rename.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# `rename`
|
||||
|
||||
> **Note:** this page refers to the command from the `util-linux` package on Linux or Homebrew's `rename` package.
|
||||
|
||||
## TL;DR
|
||||
|
||||
```sh
|
||||
# Show what would change without changing anything (dry run).
|
||||
rename -vn foo bar *
|
||||
|
||||
rename -nv 's/^(\d{4}-\d{2}-\d{2}) (.*)$/$1 addition $2/' 'file'
|
||||
```
|
||||
|
||||
## Sources
|
||||
|
||||
- [cheat.sh]
|
||||
|
||||
[cheat.sh]: https://cheat.sh/rename
|
||||
Reference in New Issue
Block a user