Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have java war file which is stored in s3 now I need to copy that file to the tomcat6 var/lib/webapps folder using ssh through my command line is it possible to do that. Or how do I send the war file my to remote instance tomcat6 folder. I failed to do that using scp. scp -r localfile.txt username@192.168.0.1:/home/username/

share|improve this question

migrated from stackoverflow.com Apr 1 '11 at 13:02

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 4 down vote accepted

You can use the s3cmd command line tool to do just that. Ensure you have s3cmd installed:

sudo apt-get install s3cmd

Then, from the command line, you can do lots of things (including downloading a file).

Run this to configure the tool for your S3 credentials:

s3cmd --configure

Then you simply run:

s3cmd get s3://<bucket name>/<file name> <local file name>

...to retrieve your file to the location of your choice.

Reference of all commands is here:

http://s3tools.org/s3cmd

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.