AWS S3:如何查看使用了多少磁盘空间 [英] AWS S3: how do I see how much disk space is using

查看:82
本文介绍了AWS S3:如何查看使用了多少磁盘空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 AWS 账户.我使用 S3 来存储来自不同服务器的备份.问题是 AWS 控制台中是否有关于我的 S3 云中使用了多少磁盘空间的信息?

I have AWS account. I'm using S3 to store backups from different servers. The question is there any information in the AWS console about how much disk space is in use in my S3 cloud?

推荐答案

Yippe - AWS CLI 的更新允许您通过存储桶递归 ls...

Yippe - an update to AWS CLI allows you to recursively ls through buckets...

aws s3 ls s3://<bucketname> --recursive  | grep -v -E "(Bucket: |Prefix: |LastWriteTime|^$|--)" | awk 'BEGIN {total=0}{total+=$3}END{print total/1024/1024" MB"}'

这篇关于AWS S3:如何查看使用了多少磁盘空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆