mc rb

MinIO 客户端 mc rb 命令用来从存储服务删除存储桶。语法如下:

C:\> mc rb -h
NAME:
  mc rb - remove a bucket

USAGE:
  mc rb [FLAGS] TARGET [TARGET...]

FLAGS:
  --force                       force a recursive remove operation on all object versions 强制对所有对象版本执行递归删除操作
  --dangerous                   allow site-wide removal of objects 允许在站点范围内移除对象
  --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

示例

(1)删除本地 MinIO 存储服务上的空存储桶 files。

D:\server\minio>mc ls local
[2021-07-10 08:10:16 CST]     0B files\
[2021-07-03 22:22:23 CST]     0B images\

D:\server\minio>mc rb local/files
Removed `local/files` successfully.

D:\server\minio>mc ls local
[2021-07-03 22:22:23 CST]     0B images\

(2)删除目录层次结构。

C:\> mc rb /tmp/this/new/dir1

(3)删除存储桶 'jazz-songs' 及其所有内容。

C:\> mc rb --force s3/jazz-songs

(4)从 S3 主机递归删除所有存储桶和对象

C:\> mc rb --force --dangerous s3
说说我的看法
全部评论(
没有评论
关于
本网站属于个人的非赢利性网站,转载的文章遵循原作者的版权声明,如果原文没有版权声明,请来信告知:hxstrive@outlook.com
公众号