trasfering data over the wire with nc

Tagged:  

nc, TCP/IP swiss army knife, is an utility to transfer data across the network (actually is much more then that...). If you need to transfer large files inside you private network it might be a good idea to use nc, instead of heavier data transfer protocols (such as nfs, samba, ssh, http...)

Server side :

nc -vvn -l -p 3000 -w 3 | pv -b > outputfile

where -l says to listen and -p 3000 specifies the port.

Client side :


nc -vvn 192.168.0.5 3000 < inputfile

This is pretty straightforward.

To make the process a bit more human friendly I've used pv that is a small monitor the progress to show how much data has been transfered.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.