Skip to content

Instantly share code, notes, and snippets.

@woffleloffle
Created February 27, 2018 13:49
Show Gist options
  • Save woffleloffle/673b63f03899777ac211ce269e6f679e to your computer and use it in GitHub Desktop.
Save woffleloffle/673b63f03899777ac211ce269e6f679e to your computer and use it in GitHub Desktop.
Count the size of an S3 Bucket (or sub-path) in Gigabytes
aws --profile {PROFILE} s3 ls s3://{BUCKET_NAME}/{PATH_NAME} --recursive | awk 'BEGIN {total=0}{total+=$3}END{print total/1024/1024/1024" GB"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment