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 have a lot of files named like:


Everyday I have several log files and I want to download specified day's log files:

$ rsync server:/var/log/foo/2014-07-06-*.log .

BUt I got zsh: no matches found error.

I found in the manual that I can filter by extension, but I couldn't find how to filter file name in case like this.

Is there easy way to use filtering with rsync?

share|improve this question
up vote 2 down vote accepted

You need to escape the special characters, e.g.

$ rsync server:/var/log/foo/2014-07-06-\*.log .


$ rsync 'server:/var/log/foo/2014-07-06-*.log' .

Or better, install url-quote-magic, e.g.

autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic
zstyle ':urlglobber' url-other-schema http https ftp mailto

so that zsh will automatically do this for you. You may want to add other URL schemes...

EDIT: Alternatively, you can unsetopt NOMATCH, so that an error falls back to POSIX shell behavior, but I would discourage you to do that, because it could lead to unexpected results in some cases.

share|improve this answer

Another way:

$ noglob rsync server:/var/log/foo/2014-07-06-*.log .

From zsh man page:

noglob   Filename  generation  (globbing)  is not performed on any of the
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.