Fast file transfer with pseudo HTTP server

GeSHi library error: modules/geshifilter/geshi is not a directory.

Time to time I need to transfer site from server to server very quickly and have not common solution for this, because I have permissios.

Solution is to use http server if you have this one of server with backups or use netcat.
On server side I run
[geshifilter-code language="shell"] nc -l -p 8080 < mybackup.tar.gz [/geshifilter-code]
or
[geshifilter-code language="shell"] netcat -l -p 8080 < mybackup.tar.gz [/geshifilter-code]

and now can use wget, curl or browser for this url:
http://serveradress:8080

if you sent link to client it will best to do little more:
[geshifilter-code language="shell"] (echo -e "HTTP/1.1 200\nContent-Disposition: attachment; filename=mybackup.tar.gz\n Content-Type: application/octet-stream\nConnection: close\n"; cat mybackup.tar.gz ) | nc -vv -l -p 8080 [/geshifilter-code]

Trackback URL for this post:

http://www.kalexandr.com/trackback/19
Links: