ls
List the contents of a bucket:
sh
s3m ls backup/backupsTIP
If using Cloudflare R2 you need to pass the prefix (option -p, --prefix), for example:
sh
s3m ls cloudflare/my-bucket --prefix testTo list available buckets:
sh
s3m ls backupTo list in-progress multipart uploads:
sh
s3m ls backup/backups --multipart-p/--prefix
To list the content of a bucket with a specific prefix:
sh
s3m ls backup/backups --prefix test-n/--number
Return only 3 results:
sh
s3m ls backup/backups --number 3--older-than
List only objects whose LastModified is strictly older than the given duration:
sh
s3m ls backup/backups --older-than 30dSupported duration forms:
NdNhNm
--json
Return machine-readable JSON instead of terminal-formatted output:
sh
s3m ls backup/backups --jsonBucket listing also supports JSON:
sh
s3m ls backup --json