Saturday, November 21, 2015

s3cmd for Ubuntu

Installing s3cmd on Ubuntu is really easy:

sudo apt-get install s3cmd
 
and then

s3cmd --configure


Note the utility saves .s3cfg file in your home directory (if not requested differently), so for another user you will have to re-configure it or copy your ~/.s3cfg file and modify it, or run

s3cmd -c ...

Trying it out:

echo "test" ~/test.txt
s3cmd --mime-type='plain/text' put ~/test.txt s3://mybucket 

Explicitly specifying the MIME type avoids s3cmd to do any guesswork trying to determine the file' MIME type.



No comments: