gsutil commands

List file count in a bucket along with storage used

$ gsutil ls -lR gs://pub | tail -n 1

list file count:

gsutil du gs://pub | wc -l

list the entire bucket recursively and then produce a total count of all objects, both files and directories, at the end:

gsutil ls -lR gs://pub

Last updated

Was this helpful?