s3cmd [-c CONFIGFILE] ls [s3://BUCKET[/PREFIX]]}
CONFIGFILE | Configuration file. Defaults to $HOME/.s3cfg |
BUCKET | Name of bucket |
PREFIX | Filter objects by prefix. Although the S3 structure is flat consisting of buckets containing objects with no hierarchy of subbuckets and subfolders, object keys can include prefixes separated by a delimiter. Hierarchy can be inferred from the prefixes. |
Example
List objects in the bucket bucket1.
$ s3cmd -c vast.s3cfg ls s3://bucket1 2019-06-24 19:51 205 s3://bucket1/blue.txt 2019-06-24 19:52 93 s3://bucket1/brown.txt 2019-06-24 19:40 176 s3://bucket1/vast.s3cfg