AWS Cheat Sheet
S3
下载文件夹
s5cmd cp "s3://bucket/*" /to-local-path/
上传文件夹
s5cmd cp "/path/to/folder/*" s3://bucket/
统计
统计总量
s5cmd ls "s3://<bucket>/<path>/**" | wc -l
统计总大小
s5cmd ls "s3://<bucket>/<path>/**" | awk '{sum += \$3} END {print sum/1024/1024/1024 " GB"}'
统计总量和总大小
s5cmd ls "s3://<bucket>/<path>/**" | awk '{sum += \$3; count++} END {print "Total size: " sum " bytes"; print "Total count: " count}'