LoginSignup
5
4

More than 3 years have passed since last update.

scpでno matches foundと出て実行できない時 zsh *

Last updated at Posted at 2020-04-30

scpでno matches foundと出て実行できない時 zsh *(ワイルドカード)

よく使うけど、毎回忘れそうなのでMemo。

$ scp -p Username@Hostname:/PATH/*.fastq ./
とか、ファイル名の指定に*(ワイルドカード)を使用すると、no matches foundと表示され実行されない。

詳しくは知らないが、bashだと問題なかったが、zshだと*で補完がかかってしまう為にこのようになるらしい。

scpを行う前に
$ setopt nonomatch
を実行すると、その後のscpが上手くいく。
ただ、exitで終了すると、次にscpで*を使う時に、またsetoptの実行が必要。

.zshrcに加えておけば、毎回実行する必要はない。
setopt nonomatchが何を指しているか理解してないので、なんとなく自分は加えていない。

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4