GoogleCloudPlatform / gsutil

A command line tool for interacting with cloud storage services.
Apache License 2.0
867 stars 332 forks source link

CommandException is occurred when i'm on training cloudml #471

Open funwarioisii opened 6 years ago

funwarioisii commented 6 years ago

I faced the problem that CommandException is occurred when i'm on training CloudML samples.

when I tried on terminal gsutil cp gs://cloudml-public/census/data/* data/ zsh: no matches found: gs://cloudml-public/census/data/*

I saw this solution, and tried following.

sudo gsutil 'cp gs://cloudml-public/census/data/* data/' CommandException: Invalid command "cp gs://cloudml-public/census/data/* data/".

I'm using

please tell me this solution.

houglum commented 6 years ago

I started up a zsh session and was able to reproduce this. It looks like the shell is attempting to expand the wildcard, rather than passing it as a literal to the command. In your second example, you're passing cp, the first path, and the second path all as one argument (all in the same set of quotes). If you want to pass the asterisk as a literal, you should surround each argument with an asterisk in single quotes, e.g.

gsutil cp 'gs://cloudml-public/census/data/*' data/