Re: Escaping spaces on gsutil basic commands?

960 views
Skip to first unread message

Mike Schwartz (Google Storage Team)

unread,
Sep 28, 2012, 10:03:50 PM9/28/12
to gsutil-...@googlegroups.com
Hi Erick,

You can enclose filenames in quotes, e.g.,

c:\>python c:\gsutil\gsutil ls "gs://BUCKET/aeg095/folder two/tnsnames.ora"

Mike



On Fri, Sep 28, 2012 at 6:28 PM, eguevara <erick....@gmail.com> wrote:
Hello. 

I managed to get gsutils working on my windows machine and was starting to test some of the basic commands. 

I'm running into an issue when trying to list objects with spaces in the name.

Is there a way to escape the uri so that the wildcard works as expected when a space is included to the filename?

c:\>python c:\gsutil\gsutil -d ls gs://BUCKET/aeg095/folder two/tnsnames.ora

Same is true for testing the getacl command. 

c:\>python c:\gsutil\gsutil -d getacl gs://BUCKET/aeg095/folder two/tnsnames.ora

Here is how it looks on the GCS side. 

"id": "BUCKET/aeg095/folder two/tnsnames.ora",

I've tried substituting the space with "%20" and "+" and the response is "no such object" or 404.

I guess i can always add the wildcard after "folder" (gs://mmi-enterprise-home/aeg095/folder*/tnsnames.ora) to work but i'm just trying to see if this is possible without using any wildcards.

Thanks.








Reply all
Reply to author
Forward
0 new messages