There are many ways to transmit files between computers over the heterogeneous network (Linux, Windows, Apple MAC and other systems). I used to run SCP for my every day administrative tasks, especially when client SCP utility is available for Windows too.

But here is useful tip on how to transmit files over network with no need to install and configure any service at server: just run at Linux or Unix server simple command:

nc -l -p 12345 < /etc/apache/httpd.conf

After this file /etc/apache/httpd.conf will be available at 12345 TCP port at any server’s IP address. To get it just load http://192.168.0.7:12345 with any browser you like (192.168.0.7 is server’s IP) at client’s PC. After file is downloaded it’s impossible to download it again without restarting nc command. Here are the results of my example:

nc-terminal.png

nc

Theoretically it shouldn’t work as there are no web server headers like Content-type or Status. But it works. Ideas why it’s so are highly appreciated :)

You might also be interested in:
Web server on bash (in one line!)

 

4 Comments

 

  1. November 4, 2009  11:35 pm by TheWorm Reply

    I think that those headers are just directive for our browsers. The browser show everything it receive, except headers, and you have written it plain text.

  2. May 9, 2010  5:33 pm by Mark Reply

    After this file /etc/apache/httpd.conf will be available at 12345 TCP port at any server’s IP address. To get it just load http://192.168.0.7:12345 with any browser you like (192.168.0.7 is server’s IP) at client’s PC. After file is downloaded it’s impossible to download it again without restarting nc command. Here are the results of my example:
    +1

  3. April 10, 2013  3:57 am by kocaeli Reply

    Sorry for the huge review, but I'm really loving the new Zune, and hope this, as well as the excellent reviews some other people have written, will help you decide if it's the right choice for you.

  4. May 7, 2013  3:50 am by sites Reply

    I enjoy you because of your own labor on this blog. My mum enjoys engaging in investigations and it's really obvious why. Many of us notice all of the powerful way you make worthwhile ideas via your web blog and attract response from some others on the subject while our simple princess has been studying a lot of things. Take advantage of the remaining portion of the new year. You are always carrying out a really great job.

Leave a reply

 

Your email address will not be published.