Skip to main content

MinIO Client (mc)

MinIO Client (mc) provides a modern alternative to UNIX commands like ls, cat, cp, mirror, diff, find etc. It supports filesystems and Amazon S3 compatible cloud storage service (AWS Signature v2 and v4).

Overview

MinIO Client offers advanced features for OSS management:

  • High-performance operations optimized for object storage
  • Cross-platform support for Linux, macOS, and Windows
  • Advanced mirroring and synchronization capabilities
  • Batch operations for efficient bulk processing
  • JSON output for scripting and automation

Installation

Linux

# Download and install
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo mv mc /usr/local/bin/

macOS

# Using Homebrew
brew install minio/stable/mc

# Manual installation
wget https://dl.min.io/client/mc/release/darwin-amd64/mc
chmod +x mc
sudo mv mc /usr/local/bin/

Windows

# Download from official website
# Or use PowerShell
Invoke-WebRequest -Uri "https://dl.min.io/client/mc/release/windows-amd64/mc.exe" -OutFile "mc.exe"

Configuration

Add OSS Alias

mc alias set oss https://<CustomerId>.oss.swiftserve.com <access-key> <secret-key>

Verify Configuration

mc admin info oss

Basic Operations

Bucket Operations

# List buckets
mc ls oss

# Create bucket
mc mb oss/my-new-bucket

# Remove empty bucket
mc rb oss/my-bucket

# Remove bucket with contents
mc rb oss/my-bucket --force

Object Operations

# Upload file
mc cp file.txt oss/my-bucket/

# Download file
mc cp oss/my-bucket/file.txt ./

# List objects
mc ls oss/my-bucket/

# Remove object
mc rm oss/my-bucket/file.txt

Advanced Operations

# Mirror directories
mc mirror ./local-folder oss/my-bucket/remote-folder/

# Find files
mc find oss/my-bucket --name "*.jpg"

# Stat object
mc stat oss/my-bucket/file.txt

MinIO Client provides high-performance command-line access to OSS with advanced features for enterprise use.