Skip to content

Instantly share code, notes, and snippets.

@Intelrunner
Created February 25, 2022 14:58
Show Gist options
  • Save Intelrunner/f3e6a932450e8bf15f035eb58d8a91b0 to your computer and use it in GitHub Desktop.
Save Intelrunner/f3e6a932450e8bf15f035eb58d8a91b0 to your computer and use it in GitHub Desktop.
List Google Cloud Storage Buckets, and Count of Objects in Each
for VARIABLE in $(gsutil ls)
do
echo $(gsutil du $VARIABLE | grep -v /$ | wc -l) $VARIABLE
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment