File transfer over HTTP

Hi;
I have a requirement for transfering of few files from one ubuntu box to another using HTTP thru shell script,provided that shell script is always run on the client side from which files has to be transferred.
can neone suggest ne possible solution for this;
Thnks;
ajay

The utility curl with option -T can be used for that.

curl -T "yourfile" http://www.sitetoupload.com

.

1 Like

You can use netcat and compress it for speedier transfer:

On the receving machine:

nc -l 80 | tar xvzf -

On the sending machine:

tar cvz directory | nc IP_of_receiving_machine 80

Note, however, that the usual HTTP traffic may get in the way. You really should use a different, unused port instead of 80, e.g. 8888.

1 Like

Hi;
thnks for reply.
Is der ne way that i can use nc as a permanent listener on server side for particular port.coz after the file transfer gets completed it releases the connection on server.
Thnks again,

From

man nc