Using S3cmd
Some common use cases
Get a list of all buckets
$ s3cmd ls
Create a new bucket
$ s3cmd mb s3://BUCKET
Get a list of all objects in a bucket
$ s3cmd la
Upload objects to a bucket
s3cmd put FILE [FILE...] s3://BUCKET[/PREFIX]
Delete an object in a bucket
s3cmd del s3://BUCKET/OBJECT
Copy an object
s3cmd cp s3://BUCKET1/OBJECT1 s3://BUCKET2[/OBJECT2]
Move an object
s3cmd mv s3://BUCKET1/OBJECT1 s3://BUCKET2[/OBJECT2]
Some advanced use cases
Retrieve the presigned URL for a bucket for a certain period of time
s3cmd signurl s3://BUCKET/OBJECT <expiry_epoch|+expiry_offset>
List incomplete multipart uploads
s3cmd multipart s3://BUCKET [Id]
Delete incomplete segments (garbage segments) for the incomplete upload ids listed in the above command
s3cmd abortmp s3://BUCKET/OBJECT Id
Notes when using S3cmd
Last updated
