How can I tell how many objects I've stored in an S3 bucket?

后端 未结 29 3686
逝去的感伤
逝去的感伤 2020-12-02 04:45

Unless I\'m missing something, it seems that none of the APIs I\'ve looked at will tell you how many objects are in an /. Is ther

29条回答
  •  渐次进展
    2020-12-02 05:28

    Old thread, but still relevant as I was looking for the answer until I just figured this out. I wanted a file count using a GUI-based tool (i.e. no code). I happen to already use a tool called 3Hub for drag & drop transfers to and from S3. I wanted to know how many files I had in a particular bucket (I don't think billing breaks it down by buckets).

    So, using 3Hub, 
    - list the contents of the bucket (looks basically like a finder or explorer window)
    - go to the bottom of the list, click 'show all'
    - select all (ctrl+a)
    - choose copy URLs from right-click menu
    - paste the list into a text file (I use TextWrangler for Mac) 
    - look at the line count  
    

    I had 20521 files in the bucket and did the file count in less than a minute.

提交回复
热议问题