NAME
     nc - pipe a shell command through a network connection

SYNOPSIS
     nc host port

DESCRIPTION
     Nc dials host at port, writes whatever arrives on its standard input, and
     prints whatever the far end sends back until the connection closes.  It
     is a plumbing fitting: a socket with a shell pipe on each end.

     The shape it suits is request then reply.  The write side finishes when
     its input runs out; the read side then waits up to fifteen seconds for
     the first byte and stops two seconds after the last one, so a server that
     holds the connection open instead of closing it does not hang the
     command.  For a conversation that goes back and forth, use con
     tcp!host!port instead -- see con(1).  There is no listen mode.

     /net/tcp must be available; run attune(1) if the deck is not already
     connected.

EXAMPLES
     Send a request from a file and keep the reply:

          nc example.com 80 <request >reply

     Ask a finger server about a user, the long way round:

          echo jon | nc example.com 79

     Filter the reply like any other output:

          nc example.com 70 | grep phlog

SEE ALSO
     con(1), finger(1), ftp(1), attune(1)

NOTES
     Reads and writes are raw, so binary passes through unaltered.  What you
     send is exactly what you piped in: if a protocol wants CRLF line endings,
     put them there yourself.

FRST Computer                                                            NC(1)
