MinIO 客户端 mc diff 命令用来列出两个存储桶之间对象名称、大小和日期的差异。语法如下:
C:\> mc diff -h NAME: mc diff - list differences in object name, size, and date between two buckets USAGE: mc diff [FLAGS] FIRST SECOND FLAGS: --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 DESCRIPTION: Diff only calculates differences in object name, size and time. It *DOES NOT* compare objects' contents. Diff 仅计算对象名称、大小和时间的差异。它不比较对象的内容。 LEGEND: < - object is only in source. 对象仅在源中 > - object is only in destination. 对象只在目的地 ! - newer object is in source. 较新的对象在源中
(1)将本地文件夹与 Amazon S3 云存储上的文件夹进行比较。
C:\> mc diff ~/Photos s3/mybucket/Photos
(2)比较本地文件系统上的两个文件夹。
D:\server\minio>mc diff ./data/files ./data/images < data\files\ping.txt < data\files\start-minio.bat < data\files\students.csv > data\images\0f78ad1e685e9e972e3780ebfbdf2192.jpeg > data\images\20210701\0f78ad1e685e9e972e3780ebfbdf2192.jpeg > data\images\20210701\16e43cd30d54b4f5fd04429f9b72321e.jpeg > data\images\20210701\4120bc42500eb9be6082f23b6071c1c5.jpg