ls
List the contents of a bucket:
s3m ls backup/backupsCloudflare R2
Since 0.25.0, listing a whole bucket on R2 works without --prefix (s3m ls cloudflare/my-bucket, and du, rm --older-than and monitor rules on a whole bucket), and so does listing the buckets (s3m ls cloudflare). Older versions failed with XML parse error: missing field Prefix or 501 NotImplemented.
To list available buckets:
s3m ls backupTo list in-progress multipart uploads:
s3m ls backup/backups --multipart-p/--prefix
To list the content of a bucket with a specific prefix:
s3m ls backup/backups --prefix test-n/--number
List at most three results across all pages. With --older-than, only matching objects count. A limit of 0 lists nothing.
s3m ls backup/backups --number 3--start-after
To continue a bucket listing after a specific key, pass its full key. With --multipart, this skips all uploads for that key.
s3m ls backup/backups --prefix daily/ --start-after daily/backup-01.tar--older-than
List only objects whose LastModified is strictly older than the given duration:
s3m ls backup/backups --older-than 30dSupported duration forms:
NdNhNm
--json
Return machine-readable JSON instead of terminal-formatted output:
s3m ls backup/backups --jsonBucket listing also supports JSON:
s3m ls backup --json
