1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-15 20:35:50 +02:00
tldr/pages/common/zmv.md
2025-07-30 07:32:48 +03:00

21 lines
563 B
Markdown

# zmv
> Move or rename files matching a specified extended glob pattern.
> See also: `zcp`, `zln`.
> More information: <https://zsh.sourceforge.net/Doc/Release/User-Contributions.html>.
- Move files using a `regex`-like pattern:
`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}}'`