diff --git a/pages/common/zmv.md b/pages/common/zmv.md new file mode 100644 index 0000000000..291ecf78b6 --- /dev/null +++ b/pages/common/zmv.md @@ -0,0 +1,21 @@ +# zmv + +> Move or rename files matching a specified extended glob pattern. +> See also `zcp` and `zln`. +> More information: . + +- 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}}'`