Various S3 utilities

Reference: https://tecadmin.net/install-s3cmd-manage-amazon-s3-buckets/#

Configure:
# s3cmd --configure

=> Insert Access Key and Secret Key of your S3 Amazon account
======================================
List all s3 bucket:
# s3cmd ls

List data of s3 bucket:
# s3cmd ls s3://tecadmin/

Create new bucket:
# s3cmd mb s3://tecadmin
======================================
Removing file from s3 bucket 
# s3cmd del s3://tecadmin/file.txt

Removing directory from s3 bucket 
# s3cmd del s3://tecadmin/backup

Remove bucket: (make sure the bucket is empty, otherwise you will get errors)
# s3cmd rb s3://tecadmin
======================================
Download files:
# s3cmd get s3://tecadmin/file.txt

Upload files:
# s3cmd put file.txt s3://tecadmin/

Upload directory:
s3cmd put -r backup s3://tecadmin/

Last updated

Was this helpful?