2025-03-14 21:59:59 -06:00
|
|
|
# zmv
|
|
|
|
|
|
|
|
|
|
> Move or rename files matching a specified extended glob pattern.
|
2025-09-14 18:48:49 -06:00
|
|
|
> See also: `zcp`, `zln`.
|
2025-03-14 21:59:59 -06:00
|
|
|
> More information: <https://zsh.sourceforge.net/Doc/Release/User-Contributions.html>.
|
|
|
|
|
|
2025-09-14 18:48:49 -06:00
|
|
|
- Move files using a `regex`-like pattern:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`zmv '{{(*).log}}' '{{$1.txt}}'`
|
|
|
|
|
|
|
|
|
|
- Preview the result of a move, without making any actual changes:
|
|
|
|
|
|
|
|
|
|
`zmv -n '{{(*).log}}' '{{$1.txt}}'`
|
|
|
|
|
|
|
|
|
|
- Interactively move files, with a prompt before every change:
|
|
|
|
|
|
|
|
|
|
`zmv -i '{{(*).log}}' '{{$1.txt}}'`
|
|
|
|
|
|
|
|
|
|
- Verbosely print each action as it's being executed:
|
|
|
|
|
|
|
|
|
|
`zmv -v '{{(*).log}}' '{{$1.txt}}'`
|