Ncat

Version: 1.0.1 (changelog)
Last released: 24 Apr 2001
Download: ncat-1.0.1.tar.gz (39KB)
Packages (external): FreeBSD

Ncat was written to make piping data between hosts easy. It has a syntax similar to cat, but allows tcp streams to be specified in addition to regular files.

The Ncat archive also includes an RPM spec file. RPM users can build a binary package ready to install by running:

rpm -tb ncat-1.0.1.tar.gz
You will find the binary rpm under /usr/src/rpm/RPMS/i386 or /usr/src/redhat/RPMS/i386.

There is another featureful tool called "netcat" but it is bidirectional (unlike cat) and doesn't work well in a uni directional pipe. Also I've noticed "netcat" causes a massive amount of collisions over my ethernet bringing any data transfer to its knees. For me, Ncat causes minimum collosions and transfers data at the maximum rate possible.

Ncat allows me to backup several machines across my LAN straight to CD without needing any temporary disk space.

See ncat(1) for more detailed information about the command.

Examples

Machine one has a growing logfile you would like to print in real time on machine two's lp0 dot matrix printer:

one
# tail -f logfile | ncat -o :0
ncat: listening on port 3724
two
# ncat one:3724 > /dev/lp0

Machine two is slow, so you would like to do the log processing on machine one instead:

one
# ncat :4321 | analyze
two
# ncat -o one:4321 example.log