Search code examples
google-cloud-storagebucketgsutil

How to get the object and sub directory count in google cloud storage bucket


Is their any Command or option in Google Developer Console to get the object and sub directory count in google cloud storage bucket.


Solution

  • I don't think there is such option in the developer console. I think the best way to count objects is to use gsutil (https://cloud.google.com/storage/docs/gsutil?hl=en)? You can use commands like "gsutil ls gs://bucket/** | wc -l" to count the number of objects in a bucket.