minio-client
Manage S3-compatible object storage
TLDR
View documentation for the original command
SYNOPSIS
mc [GLOBAL FLAGS] COMMAND [FLAGS] [ARGUMENTS...]
Examples of common command usage:
mc ls [ALIAS/]BUCKET[/PREFIX]
mc cp SOURCE TARGET
mc config host add ALIAS ENDPOINT ACCESS_KEY SECRET_KEY [API_SIGNATURE]
PARAMETERS
ls
Lists buckets, objects, and prefixes on a remote S3-compatible service. Similar to Unix ls.
cp
Copies objects from one location to another, supporting local to remote, remote to local, or remote to remote transfers. Similar to Unix cp.
mb
Creates a new bucket on the S3-compatible service. Similar to Unix mkdir.
rb
Removes a bucket. The bucket must be empty unless the --force flag is used.
cat
Displays the content of an object to standard output. Similar to Unix cat.
stat
Displays metadata for a bucket or object, including size, creation date, and ETag.
sync
Synchronizes content between two locations (local, remote, or remote to remote), ensuring destinations match sources.
config
Manages host aliases and configuration settings for connecting to different S3-compatible services.
policy
Manages bucket policies, controlling access permissions for users and groups.
admin
Provides administrative commands for managing MinIO servers, including users, groups, service health, and more.
--json
Outputs command results in JSON format, useful for scripting and programmatic consumption.
--recursive or -r
Performs operations recursively on directories/buckets and their contents.
--help or -h
Displays help information for a command or subcommand.
DESCRIPTION
The mc command, often referred to as the MinIO Client, is a powerful and versatile command-line tool designed for interacting with MinIO servers and other S3-compatible object storage services. It provides a familiar Unix-like interface, enabling users to manage buckets and objects with commands akin to ls, cp, mv, and rm. Beyond basic file operations, mc offers advanced features like data synchronization, policy management, user/group administration (with its mc admin subcommand), and support for various authentication methods. It's an essential tool for developers and administrators working with cloud-native applications and large datasets on object storage.
CAVEATS
The mc command requires an initial configuration step using mc config host add to define aliases for S3-compatible endpoints before most operations can be performed.
Permissions for operations are determined by the policies associated with the access key used for authentication.
For large-scale synchronization, ensure sufficient network bandwidth and local disk space.
ALIASES AND REMOTE PATHS
mc uses the concept of 'aliases' to refer to configured remote S3 endpoints. A path to an S3 bucket or object typically starts with an alias, e.g., myremote/mybucket/myobject.txt. This makes interacting with multiple cloud storage services seamless.
PIPING AND STREAMING
Many mc commands support piping, allowing data to be streamed directly between commands or to/from other Unix utilities without intermediate disk storage, enhancing efficiency for large data operations.
HISTORY
MinIO was founded in 2014, and the mc command-line client was developed alongside its object storage server. Its design emphasizes simplicity, high performance, and compatibility with the Amazon S3 API. Over the years, it has evolved to become a comprehensive tool for managing S3-compatible storage, widely adopted in cloud-native environments for its Unix-like usability and rich feature set.