Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can i search google cloud storage buckets recursively in the console?

We have uploaded files to google cloud storage buckets and planning to create a permission to have a number of people access it. So far we could only filter/search files and folders in the directory you are in. Is it possible to search files recursively though?

like image 272
Ian Aguinaldo Avatar asked Oct 17 '25 09:10

Ian Aguinaldo


1 Answers

It seems what you are looking for is the following command for searching within a bucket recursively:

gsutil ls -r gs://bucket/**

Note: "bucket" is the name of the bucket you have set.

In the case you would like to search within a specific directory you can run the following:

gsutil ls -r gs://bucket/dir/**

Note: "dir" would be the directory in which you would like to search

You can find more information regarding searching through "Directory By Directory, Flat, And Recursive" by going to the following link.


Update

If this is not what you meant then I would like to mention another option. You can retrieve the information regarding the contents in a bucket through an API as well. The following API link here retrieves a list of objects matching the criteria specified.

Note: In order for this API to work the user must have "READER" permission or above.

Please let me know if this is what you were looking for.

like image 151
Harmit Rishi Avatar answered Oct 22 '25 05:10

Harmit Rishi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!