0

Am I stupid or is this command just totally broken or unclear in usage

I want to see the size of a specific prefix in a bucket

aws s3 ls --summarize --human-readable --recursive 's3://mybucket/myfolder/'

OR

aws s3 ls 's3://mybucket/myfolder/' --summarize --human-readable --recursive

This returns every individual object with a prefix of myfolder/- how is that a summary of anything? Am I missing something?

red888
  • 4,183
  • 18
  • 64
  • 111

1 Answers1

1

The --summarize flag prints out the summary (total objects and total size) at the end of the output. If you only want to see the summary, use tail:

aws s3 ls --summarize --recursive 's3://mybucket/myfolder/ | tail -2'
Ben Whaley
  • 1,433
  • 13
  • 13