LoginSignup
0
0

More than 5 years have passed since last update.

S3 内のファイルのデータ容量を知る方法

Posted at
aws s3 ls --recursive s3://BUCKET/hoge/ > hoge.txt
cat hoge.txt|awk '{a+=$3} END{print a;}'

hoge.txt

2016-12-01 19:17:00    12345 fuge/2016-12-01-19-17-00-1234567890ABCDEF
2016-12-01 19:17:01    67890 fuge/2016-12-01-19-17-01-1234567890ABCDEF

とすると、80235 bytes と出力される。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0