0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

S3で指定した拡張子の総容量をもとめる方法

Posted at

概要

S3バケットの中にある、特定の拡張子を調べるコマンドを記載します。

手順

  • 対象S3があるアカウントのコンソールにログインする
  • CloudShellを開く
  • 以下コマンドを入力する
aws s3 ls s3://[バケット名]/[フォルダ名] --recursive | grep -E '\.([拡張子]|[拡張子])$' | awk '{total += $3} END {print total/1024/1024 " MB"}'

このコマンドを利用することで、指定した拡張子の総容量がMB単位で表示されます。
また、バケットの中にある特定フォルダの総容量はコンソール上から確認ができます。
手順は以下の公式サイトに記載されています。
https://docs.aws.amazon.com/ja_jp/AmazonS3/latest/userguide/using-folders.html#calculate-folder

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?