简体   繁体   English

如何在Amazon S3中按大小范围计算文件数量及其占用的卷

[英]How do I account the number of files and the volume they occupy by size range in amazon s3

I need to get the number of files and total size by size ranges like: 我需要按大小范围获取文件数和总大小,例如:

  • Total amount and volume of files up to 100MB. 文件总数和最大容量为100MB。
  • Total amount and volume of files from 100MB up to 1.8GB. 文件的总量和大小从100MB到1.8GB。
  • Total amount and volume of files over 1.8GB. 超过1.8GB的文件总数和容量。

Preferably using a CLI tool. 最好使用CLI工具。

S3cmd CLI tool can be used to run commands for amazon s3. S3cmd CLI工具可用于运行Amazon s3的命令。

To get the disk usage by buckets: 要通过存储桶获取磁盘使用情况:

s3cmd du s3://bucket/ : Disk usage in bytes
s3cmd du -H s3://bucket/ : Size in Human readable format (MB, GB, etc..)

CLI reference link . CLI参考链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM