NCAT(1) User Manual NCAT(1)NAMEncat - network aware cat
SYNOPSISncat-V | -h
ncat [ -c | -n | -v | -o stream | -b size ]... stream...
DESCRIPTIONncat concatenates data streams similar to cat(1) except the streams can
be files or TCP connections. If no streams are given on the command
line ncat will default to reading from standard input and writing to
standard output.
There are several different forms for specifying a stream:
filename or filename:
Any filename containing a colon needs to be escaped by adding a
colon on the end, otherwise it will be interpreted as a tcp
stream. A special filename "-" can be used to specify standard
input or output.
host:port
Connect to host/port. This will fail if the remote side is not
ready for the connection.
:port Wait for a connection on port. This can block indefinitely. If
port is 0 (or omitted) ncat will bind to a free port and display
the port used on standard error.
OPTIONS-o, --output
Output to stream instead of standard output.
-b, --block-size
Use a different block size for reading and writing. The default is 512
bytes. size can be given a suffix to denote a multiplier: b for 512 ,
k for 1024, m for 1024k.
-v, --verbose
Show data transfer statistics.
-n, --no-delay
Disable buffering and merging small tcp packets. This can reduce
latency in some situations.
-c, --cork
Prevent TCP from sending partial packets across the network until the
connections is closed. This breaks compatibility with cat by not pass‐
ing data on immediately, but it may improve performance depending on
your requirements. Linux 2.2+ is required to use this option.
-V, --version
Display version and exit.
-h, --help
Display usage information and exit.
EXIT STATUS
0 Success
1 One or more errors occured reading data and ncat continued onto
the next stream.
255 A fatal error occured writing data.
BUGS
Some rarely used options found in cat(1) are missing from ncat. These
options can be recreated easily by using another filter such as
perl(1), awk(1), sed(1), or tr(1).
AUTHOR
Mark Pulford <mark@kyne.com.au>
SEE ALSOcat(1), nc(1).
http://www.kyne.com.au/~mark/software.html
⟨http://www.kyne.com.au/~mark/software.html⟩
v1.0.1 April 24, 2001 NCAT(1)