Skip to content

Instantly share code, notes, and snippets.

@dfarrell-bloom
Last active December 29, 2015 11:09
Show Gist options
  • Save dfarrell-bloom/7662035 to your computer and use it in GitHub Desktop.
Save dfarrell-bloom/7662035 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment