mc du

MinIO 客户端中的 mc du 命令采用递归的方式去统计磁盘使用情况,语法如下:

C:\> mc du -h
NAME:
  mc du - summarize disk usage recursively

USAGE:
  mc du [FLAGS] TARGET

FLAGS:
  --depth value, -d value       print the total for a folder prefix only if it is N or fewer levels below the command line argument (default: 0) 
                                仅当文件夹前缀低于命令行参数 N 或更少级别时才打印文件夹前缀的总数(默认值:0)
  --recursive, -r               recursively print the total for a folder prefix
  --rewind value                include all object versions no later than specified date
  --versions                    include all object versions
  --encrypt-key value           encrypt/decrypt objects (using server-side encryption with customer provided keys)
  --config-dir value, -C value  path to configuration folder (default: "C:\\Users\\Administrator\\mc")
  --quiet, -q                   disable progress bar display
  --no-color                    disable color theme
  --json                        enable JSON lines formatted output
  --debug                       enable debug output
  --insecure                    disable SSL certificate verification
  --help, -h                    show help

ENVIRONMENT VARIABLES:
  MC_ENCRYPT_KEY: list of comma delimited prefix=secret values

示例

(1)递归地统计 'images' 存储桶的磁盘使用情况。

D:\server\minio>mc du local/images
3.7MiB  images

(2)将 'images' 存储桶中 '300x300' 前缀的磁盘使用情况汇总到两个级别。

D:\server\minio>mc du --depth=2 local/images/300x300/
1.5MiB  images/300x300/20210701
946KiB  images/300x300/20210702
994KiB  images/300x300/20210713
3.4MiB  images/300x300

(3)在固定日期/时间统计 “images” 存储桶的磁盘使用情况

D:\server\minio>mc du --rewind "2020.07.13" local/images/
7.1MiB  images

(4)使用所有对象版本总结 “images” 存储桶的磁盘使用情况

D:\server\minio>mc du --versions local/images/
7.1MiB  images
说说我的看法
全部评论(
没有评论
关于
本网站属于个人的非赢利性网站,转载的文章遵循原作者的版权声明,如果原文没有版权声明,请来信告知:hxstrive@outlook.com
公众号