Sha256: d222c290e84eb80f9d97d5b33db398554905fea0891ddaa5c917c798d998454b
Contents?: true
Size: 753 Bytes
Versions: 1
Compression:
Stored size: 753 Bytes
Contents
#!/usr/bin/env ruby require 'pathname' BASE_DIR = Pathname.new(File.expand_path('..', __dir__)) $LOAD_PATH << "#{BASE_DIR}/lib" require 'optparse' require 's3grep' require 'aws-sdk-s3' require 'json' s3_file = ARGV[0] aws_s3_client = Aws::S3::Client.new info = S3Grep::Directory.new(s3_file, aws_s3_client).info stats = { bucket: info.bucket, base_prefix: info.base_prefix, total_size: info.total_size, num_files: info.num_files, last_modified: info.last_modified, newest_file: info.newest_file, first_modified: info.first_modified, first_file: info.first_file, num_files_by_storage_class: info.num_files_by_storage_class, total_size_by_storage_class: info.total_size_by_storage_class } print JSON.pretty_generate(stats) + "\n"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
s3grep-0.1.9 | bin/s3info |