Hosting » Google Cloud » Which CLI command lists Google Cloud storage buckets?

Which CLI command lists Google Cloud storage buckets?

Last updated on September 25, 2022 @ 8:50 pm

There are a few different ways to list Google Cloud storage buckets. The simplest way is to use the gcloud command line tool. For example, the following command lists all the buckets in your account:

gcloud storage buckets list

The other way to list Google Cloud storage buckets is to use the gsutil command line tool. For example, the following command lists all the buckets in your account that have the “my-bucket” name:

gsutil list my-bucket

The third way to list Google Cloud storage buckets is to use the Google Cloud Platform Console. To access the Google Cloud Platform Console, go to https://console.cloud.google.

com/. In the left column, under “Projects,” select your project ID. Then, in the right column, under “Compute,” select “Storage.” Under “Buckets,” select “List buckets.” The following command lists all the buckets in your account that have the “my-bucket” name:.

gcloud storage buckets list my-bucket

The following command lists all the buckets in your account that have the “foo” name:

PRO TIP: The CLI command ‘gsutil ls’ lists Google cloud storage buckets. However, it is important to note that this command only works if you have the Google Cloud SDK installed and configured on your system.

gcloud storage buckets list foo

The following command lists all the buckets in your account that are greater than 10GB in size:

gcloud storage buckets list –max-size=10GB

The following command lists all the buckets in your account that have the “foo” name and are greater than 10GB in size:

gcloud storage buckets list foo –max-size=10GB –with-meta

The following command lists all the buckets in your account that have the “bar” name and are greater than 10GB in size:

gcloud storage buckets list bar –max-size=10GB –with-meta.

Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.