X

How to: setup and configure s3cmd in Linux

In this article, we will show you how to setup and configure the s3cmd tool for Amazon S3. S3cmd is a command line tool for uploading, retrieving and managing data in Amazon S3.

In this article, we will show you how to setup and configure the s3cmd tool for Amazon S3. S3cmd is a command line tool for uploading, retrieving and managing data in Amazon S3.

Step 1 :  Make directory for download files

 #mkdir s3cmd  ; cd s3cmd

Steo 2 :  Download S3cmd tool

 #wget http://garr.dl.sourceforge.net/project/s3tools/s3cmd/1.5.0-alpha3/s3cmd-1.5.0-alpha3.tar.gz

Step 3 :  Install Python as a perquisite for installation of s3cmd tool

In Redhat/CentOS/Fedora

# yum install python

In Ubuntu/Debian

# apt-get install python

Step 4: Extract s3cmd tarball and install it

# tar -xvzf s3cmd-1.5.0-alpha3.tar.gz# python setup.py install

Step 5: Configure s3cmd by providing infomation so that it can access your S3 account

You have to enter your Access Key and Secret Key of your AWS account using s3cmd -configure command

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Using s3cmd :

– mb :- This command is used for making new bucket.
Example: s3cmd mb s3://bucketname

– rb :- This command is used for removing for bucket.
Example: s3cmd rb s3://buckettoremove

– ls :- This command lists all file. You can also tell it to check a path/bucket
Example: s3cmd ls
Example 2: s3cmd ls s3://buckettocheck

– put :- This command puts/uploads a file to the path your specify
Example: s3cmd put ~/filetoupload.txt s3://buckettouploadto

– get :- This is the same as the put command but in reverse
Example: s3cmd get s3://bucket/filetodownload.txt ~/locationtoputit

– del :- This command deltes a file on the S3 server
Example: s3cmd del s3://bucket/filetodelete.txt

  • Tags: configuring s3cmd, s3cmd how to, s3cmd in linux, s3cmd tutorial,