Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

when I try scp over zsh, I get

scp hostA:Descargas/debian-6.0.4-* user@
zsh: no matches found: hostA:Descargas/debian-6.0.4-*

the same command work in bash

share|improve this question
Can you mark one of the answers as correct? Some look pretty good. – Geoff Oct 26 '13 at 20:16
up vote 26 down vote accepted

Escape your wildcard :

scp hostA:Descargas/debian-6.0.4-\*
share|improve this answer
This solved this for me - thanks – Jon Aug 29 '13 at 10:32
I got the same error when trying to run a ruby resque worker with the QUEUE=* option. Thanks for the fix! – mogramer Aug 29 '14 at 2:51

Unset the NOMATCH option so that zsh leaves the text alone instead of complaining about a glob failure.

share|improve this answer

This post has a nice solution to this by using the url-quote-magic plugin to automatically escape globs in scp commands. To enable it, add the following to your ~/.zshrc:

# Automatically quote globs in URL and remote references
__remote_commands=(scp rsync)
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
zstyle -e :urlglobber url-other-schema '[[ $__remote_commands[(i)$words[1]] -le ${#__remote_commands} ]] && reply=("*") || reply=(http https ftp)'

When you type a glob character (like *) as part of a remote path in an scp or rsync command, zsh will automatically add a blackslash in front, like this:

scp hostA:Descargas/debian-6.0.4-\* user@
share|improve this answer
This is a nasty but nice trick. – Attila O. Nov 5 '13 at 1:22

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.