> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tape.network/llms.txt
> Use this file to discover all available pages before exploring further.

# MinIO Client

[`mc`](https://min.io/docs/minio/linux/reference/minio-mc.html) is MinIO's command-line client for S3 storage. It works against a Tapedrive bucket once you set an alias for the gateway.

## Before you start

You need a bucket and a credential. A bucket is a tape that has delegated writes to the gateway, and a credential is an access key pair the gateway operator issues you. [Set up a bucket](/tools/s3-gateway#set-up-a-bucket) walks through both.

Refer to the bucket by its lowercase label, not its base58 address. `mc` rejects bucket names with uppercase letters before sending any request.

## Configure

```bash theme={null}
mc alias set tapedrive https://s3.example.com TAPE4Q7ZK2M9XH3PD8AW mZ9vQ3nL8kR2tW6yB4cX7dF1hJ5pS0aG3uE8iO2q
```

## Everyday commands

```bash theme={null}
# list your buckets
mc ls tapedrive

# list objects
mc ls tapedrive/my-bucket

# upload a file or a directory
mc cp ./photo.jpg tapedrive/my-bucket/photos/
mc cp --recursive ./photos tapedrive/my-bucket/

# mirror a directory into the bucket, then check nothing differs
mc mirror ./photos tapedrive/my-bucket/photos
mc diff ./photos tapedrive/my-bucket/photos

# download
mc cp tapedrive/my-bucket/photos/photo.jpg ./photo.jpg

# metadata, or the content itself
mc stat tapedrive/my-bucket/photos/photo.jpg
mc cat tapedrive/my-bucket/photos/notes.txt

# delete one object, or a whole prefix
mc rm tapedrive/my-bucket/photos/old.jpg
mc rm --recursive --force tapedrive/my-bucket/photos/2019
```

An empty `mc diff` means the mirror matches. Files over 16 MiB upload as multipart and come back byte for byte identical.

## Good to know

* `mc mb` reports that you already own the bucket and creates nothing. Buckets are created with [`tape create`](/tools/cli/commands/tape-management#create).
* A recursive delete removes objects in one request, and they disappear from listings immediately. Each one is still its own transaction on the chain behind the scenes.

## Next

* [Rclone](/tools/quickstarts/rclone) does the same job with sync and check.
* [Deletions](/tools/s3-gateway/deletions) for what a bulk delete costs on chain.
