Is there an option to count the number of files in bucket-folders?
Like:
gsutil ls -count -recursive gs://bucket/folder
Result: 666 files
You want to gsutil ls -count -recursive
in gs://bucket/folder
?
Alright; gsutil ls gs://bucket/folder/**
will list just full urls of the paths to files under gs://bucket/folder
without the footer or the lines ending in a colon. Piping that to wc -l
will give you the line-count of the result.
gsutil ls gs://bucket/folder/** | wc -l