s3find
A powerful command line utility to walk an Amazon S3 hierarchy. Think of it as the find command but specifically designed for Amazon S3.
Table of Contents
Installation
Pre-built Binaries
Github Release page provides ready-to-use binaries for:
- Windows (x86_64)
- Linux (x86_64 and ARM)
- macOS (x86_64 and ARM)
Binaries for both architectures allow you to run s3find natively on Intel-based and ARM-based machines (like Apple M1/M2/M3/M4, AWS Graviton, and Raspberry Pi).
Build from Source
Requirements: Rust and Cargo
# Build
# Install from local source
# Install latest from git
# Install from crates.io
Usage
Basic Syntax
Where:
<s3-path>is formatted ass3://bucket/path[OPTIONS]are filters and controls[COMMAND]is the action to perform on matched objects
Authentication Methods
s3find supports multiple AWS authentication methods in the following priority:
- Command-line credentials (
--aws-access-keyand--aws-secret-key) - Environment variables (
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY) - AWS profile credentials file (configurable via
AWS_PROFILEandAWS_SHARED_CREDENTIALS_FILE) - AWS instance IAM profile
- AWS container IAM profile
Command Line Reference
) for
)
)
<path>
)
)
)
)
)
)
)
Examples
Finding Files by Glob Pattern
Use the --name option with glob patterns to match objects:
# Find all objects in a path
# Find objects with specific extension
Output Formats
The print command supports different output formats:
# Default format
# Text format
# JSON format
# CSV format
Case Insensitive Search
Use --iname for case-insensitive glob pattern matching:
Regex Pattern Matching
Use --regex for regular expression pattern matching:
# Find objects ending with a number
Find Path by Size
# Exact match - files exactly 0 bytes
# Larger than 10 megabytes
# Smaller than 10 kilobytes
Find Path by Time
# Files modified in the last 10 seconds
# Files modified more than 10 minutes ago
# Files modified in the last 10 hours
Object Storage Class Filter
Filter objects by their storage class:
# Find objects in STANDARD storage class
# Find objects in GLACIER storage class
Multiple Filters
Combine filters to create more specific queries:
# Files between 10 and 20 bytes
# Combine different filter types
Actions and Operations
Delete Objects
List Objects and Tags
# List objects
# List objects with their tags
Execute Commands on Objects
Download Objects
Copy and Move Operations
# Copy files to another location
# Move files to another location
Tag Management
Make Objects Public
Additional Control
Control the number of results and request behavior:
# Limit to first 10 matching objects
# Control page size for S3 API requests
For more information, see the GitHub repository.