Netcat an easy tool
Imagine need to make a tar
file but no space left on local disk. You can use netcat to transfer
the tar file to an other networked machine.
The is as the sender being the server:
tar cf directory | nc -l -p 2048
But you can als connect the sender to the receiver:
tar cf directory | nc remotehost 2048
The receive connecting to the sender and storing the datastream at giving location:
nc remotehost 2048 > nameoftar.tar
The receiving end is running as server waiting for an incoming connection:
nc -l -p 2048 > nameoftar.tar
Note: if you uses gzip or bzip2, change the file to look soemthing like this:.tar.gz or .tar.bz2
Some usefull information(from wikipedia):
Netcat was voted the second most useful network security tool in a 2000 poll conducted by insecure.org on the nmap users mailing list.[1] In 2003, it gained fourth place,[2] a position it also held in the 2006 poll.[3]
If there are suggetions on the use onf netcat please let me know.