Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've heard great things about zmv in zsh, and would love to really learn to use it. However, I am still relatively unexperienced in zsh, and have some basic questions:

  • Is there is a man page for zmv in zsh (man zsh outputs "No manual entry for zmv")
  • Does zmv natively allow for dry runs?
  • If the answer to the above is no, how would you test or do a dry run with zmv ?
share|improve this question
up vote 9 down vote accepted

The zmv manual is in the zshcontrib man page. You can reach it directly with

LESS="$LESS+/^ *zmv *\\[" man zshcontrib

(or LESS=$LESS+/zmv man zshcontrib which takes you a few lines further up because zmv is mentioned in the description of zcp). You can use man zshall instead of man zshcontrib if the zshall man page is available on your system.

If you use Info, you can reach it by running info zsh and typing i then entering zmv.

info --index-search=zmv zsh

The zsh guide has a fairly detailed section on zmv. Searching for zmv on this site will turn up several usage examples of varying complexity.

You can perform a dry run with zmv -n (-n is a common way of requesting a dry run).

To benefit from zmv and friends, it helps to have code like the following in your ~/.zshrc:

autoload zmv
alias zmv='noglob zmv'
alias zcp='noglob zmv -C'
alias zln='noglob zmv -L'
alias zsy='noglob zmv -Ls'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.