Skip to content

Instantly share code, notes, and snippets.

@YordanGeorgiev
Created November 15, 2018 11:37
Show Gist options
  • Save YordanGeorgiev/a9f65d334f6aa22b5aea09bf96aeae7d to your computer and use it in GitHub Desktop.
Save YordanGeorgiev/a9f65d334f6aa22b5aea09bf96aeae7d to your computer and use it in GitHub Desktop.
[s3cmd-cheat-sheet] s3cmd-cheat-sheet #s3cmd cheat sheet
# how-to list the files in the bucket recursively
s3cmd ls -r -c ~/.aws/s3cmd/$aws_profile.s3cfg s3://$bucket | sort -nr | less
# how-to upload a file-or-dir to the bucket
s3cmd -r -c ~/.aws/s3cmd/$aws_profile.s3cfg put --acl-public --guess-mime-type /path/to/local/file s3://$bucket/path/to/remote/obj-file-or-dir
# how-to download a file-or-dir-object from the remote s3 bucket
s3cmd -r -c ~/.aws/s3cmd/$aws_profile.s3cfg get s3://$bucket/path/to/remote/obj-file /path/to/local/file-or-dir
# how-to delete , how-to remove
s3cmd -c ~/.aws/s3cmd/$aws_profile.s3cfg del -r s3://$bucket/path/to/delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment