Update main.md

This commit is contained in:
RadinPirouz
2025-09-20 16:58:22 +03:30
committed by GitHub
parent 93e9923810
commit 238e8affa0

View File

@@ -1,10 +1,10 @@
# 📘 S5CMD Reference Guide
# S5CMD Reference Guide
`s5cmd` is a fast and efficient S3 and local filesystem command-line tool optimized for large-scale data operations.
---
## 🔹 Command Syntax
## Command Syntax
```bash
s5cmd [global options] <command> [command options] [arguments...]
@@ -12,7 +12,7 @@ s5cmd [global options] <command> [command options] [arguments...]
---
## ⚙️ Global Options
## Global Options
| Option | Description |
| ----------------------- | ---------------------------------------------- |
@@ -27,67 +27,67 @@ s5cmd [global options] <command> [command options] [arguments...]
---
## 📂 Common Commands
## Common Commands
### 🔍 List Buckets/Objects
### List Buckets/Objects
```bash
s5cmd ls s3://bucket_2/
```
### 🪣 Bucket Management
### Bucket Management
```bash
s5cmd mb s3://new-bucket # Create bucket
s5cmd rb s3://bucket-name # Remove bucket
```
### 📤 Upload Files
### Upload Files
```bash
s5cmd cp local.txt s3://bucket/file.txt
```
### 📥 Download Files
### Download Files
```bash
s5cmd cp s3://bucket/file.txt ./local.txt
s5cmd cp s3://bucket/*.jpg ./photos/
```
### 🔀 Move/Rename Files
### Move/Rename Files
```bash
s5cmd mv s3://bucket/old.txt s3://bucket/new.txt
```
### 🗑️ Remove Files
### Remove Files
```bash
s5cmd rm s3://bucket/file.txt
s5cmd rm --all-versions s3://bucket/file.txt
```
### 🔄 Synchronization
### Synchronization
```bash
s5cmd sync ./localdir/ s3://bucket/targetdir/
s5cmd sync s3://bucket/targetdir/ ./localdir/
```
### 📖 Read File Content
### Read File Content
```bash
s5cmd cat s3://bucket/file.txt
```
### 📊 Disk Usage
### Disk Usage
```bash
s5cmd du s3://bucket/*
```
### 🔎 Query with S3 Select
### Query with S3 Select
```bash
s5cmd select "select * from s3object s limit 10" s3://bucket/data.csv