how to create directory with GSUTIL

11,383 views
Skip to first unread message

TooNetCreation

unread,
Oct 11, 2018, 4:43:50 AM10/11/18
to gce-discussion
Hello,

Do you know the command line to create a directory into a bucket?

something like : gsutil mkdir gs://bucket-name

Thanks

TooNetCreation

unread,
Oct 11, 2018, 5:00:35 AM10/11/18
to gce-discussion
solution found.

create an empty file inside bucket and then remove empty file.

xchri...@google.com

unread,
Oct 12, 2018, 3:06:59 PM10/12/18
to gce-discussion
Directories don't actually exist in buckets. See <article001>. It explains: 

"gsutil provides the illusion of a hierarchical file tree atop the "flat" name space supported by the Google Cloud Storage service. To the service, the object gs://your-bucket/abc/def.txt is just an object that happens to have "/" characters in its name. There is no "abc" directory; just a single object with the given name."

You don't need to create a "directory" to add a file to it. It's mostly for the naming convention that "/"'s are allowed.

You can also use the GUI console to create a folder. Simply go to your bucket in the console & click the create folder button. More about folder creation here

Laurent Lacoste

unread,
Oct 13, 2018, 4:29:52 AM10/13/18
to xchri...@google.com, gce-dis...@googlegroups.com
thank you for all these details /// I undestand behavior now -)



--
© 2018 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/16e5af3b-b44c-4819-9924-263df690d2b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Taame (Google Cloud Support)

unread,
Oct 13, 2018, 2:18:48 PM10/13/18
to gce-discussion
I’m glad to hear that the provided information was useful and that you’ll continue using our platform and enjoy its features. 

Let us know if you have any other questions or concerns. Will be happy to help. 

On Saturday, October 13, 2018 at 4:29:52 AM UTC-4, TooNetCreation wrote:
thank you for all these details /// I undestand behavior now -)



Le ven. 12 oct. 2018 à 21:07, xchristian via gce-discussion <gce-discussion@googlegroups.com> a écrit :
Directories don't actually exist in buckets. See <article001>. It explains: 

"gsutil provides the illusion of a hierarchical file tree atop the "flat" name space supported by the Google Cloud Storage service. To the service, the object gs://your-bucket/abc/def.txt is just an object that happens to have "/" characters in its name. There is no "abc" directory; just a single object with the given name."

You don't need to create a "directory" to add a file to it. It's mostly for the naming convention that "/"'s are allowed.

You can also use the GUI console to create a folder. Simply go to your bucket in the console & click the create folder button. More about folder creation here

On Thursday, October 11, 2018 at 5:00:35 AM UTC-4, TooNetCreation wrote:
solution found.

create an empty file inside bucket and then remove empty file.

Le jeudi 11 octobre 2018 10:43:50 UTC+2, TooNetCreation a écrit :
Hello,

Do you know the command line to create a directory into a bucket?

something like : gsutil mkdir gs://bucket-name

Thanks

--
© 2018 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-discussion@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.

---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to gce-discussion@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages