Welcome to the upcoming version of the MinIO Documentation! The content on this page is under active development and may change at any time. If you can't find what you're looking for, check our legacy documentation. Thank you for your patience.

mc stat

Table of Contents

Description

The mc stat command displays information on objects contained in the specified S3-compatible service bucket. mc stat has similar functionality as the stat command when used on a filesystem path.

Examples

mc stat ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.

  • Replace PATH with the path to the bucket or object on the S3-compatible host.

Use mc stat with the --recursive option to apply the operation to all objects in the bucket:

mc stat --recursive ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.

  • Replace PATH with the path to the bucket or object on the S3-compatible host.

Syntax

stat has the following syntax:

mc stat [FLAGS] TARGET

stat supports the following arguments:

TARGET

The full path to an object or file.

For objects on an S3-compatible service, specify the alias of a configured S3 service as the prefix to the TARGET path. For example:

mc stat [FLAGS] play/mybucket

If you specify a directory or bucket, you must also specify mc stat --recursive to recursively apply the command to the contents of that directory or bucket.

--recursive, --r

Recursively mc stat the contents of TARGET.

--encrypt-key

Encrypt or decrypt objects using server-side encryption with client-specified keys. Specify key-value pairs as KEY=VALUE.

  • Each KEY represents a bucket or object.

  • Each VALUE represents the data key to use for encrypting

    object(s).

Enclose the entire list of key-value pairs passed to --encrypt-key in double quotes ".

--encrypt-key can use the MC_ENCRYPT_KEY environment variable for retrieving a list of encryption key-value pairs as an alternative to specifying them on the command line.