Skip to content

Instantly share code, notes, and snippets.

View dfarrell-bloom's full-sized avatar

Dan Farrell dfarrell-bloom

  • Bloom Health
  • Minnepolis, MN
View GitHub Profile
@dfarrell-bloom
dfarrell-bloom / s3buckets.sh
Last active December 29, 2015 11:09
Get list of buckets from s3cmd
# list all buckets in an account
s3cmd --config .s3cfg-prod ls | sed -e 's|^.*s3://||'
# list all buckets, then iterate through to show contents bit by bit.
for i in `s3cmd --config .s3cfg-prod ls | sed -e 's|^.*s3://||'`; do
( echo $i; s3cmd --config .s3cfg-prod ls s3://$i; ) | less;
done