我正在使用 aws cli 汇总文件数量和 s3 存储桶的总大小,使用以下命令(文档):
aws s3 ls s3://mybucket --recursive --human-readable --summarize
此命令给出以下输出:
2013-09-02 21:37:53 10 Bytes a.txt
2013-09-02 21:37:53 2.9 MiB foo.zip
2013-09-02 21:32:57 23 Bytes foo/bar/.baz/a
2013-09-02 21:32:58 41 Bytes foo/bar/.baz/b
2013-09-02 21:32:57 281 Bytes foo/bar/.baz/c
2013-09-02 21:32:57 73 Bytes foo/bar/.baz/d
2013-09-02 21:32:57 452 Bytes foo/bar/.baz/e
2013-09-02 21:32:57 896 Bytes foo/bar/.baz/hooks/bar
2013-09-02 21:32:57 189 Bytes foo/bar/.baz/hooks/foo
2013-09-02 21:32:57 398 Bytes z.txt
Total Objects: 10
Total Size: 2.9 MiB
但是,我只追求Total Objects
和Total Size
输出,例如:
Total Objects: 10
Total Size: 2.9 MiB
我怎样才能仅显示Total Objects
和Total Size
而抑制/隐藏其余部分?