PING(1)

NAME
nc - network client and server

SYNOPSIS
nc [-46luv] host service

DESCRIPTION
nc is a simple network client that connects to the host and service and transmits its standard input and receives to its standard output. nc exits when the connection has been closed. nc closes the connection for writing upon the end of input and continues to read until the remote closes for writing.

The options are as follows:

-4  Use Internet Prototocol version 4 ((ip) 4).

-6  Use Internet Prototocol version 6 ((ip6) 4).

-l  Accept a singular connection as a network server instead of connecting as a client. nc binds locally to the host and service and accepts a singular connection.

-u  Send and receive datagrams instead of using a streaming connection. For the Internet Protocol, udp(4) is used instead of tcp(4).

-v  Write a diagnostic to the standard error whenever a connection has been established or accepted.

EXIT STATUS
nc will exit 0 on success and non-zero otherwise.

SEE ALSO
cat(1), ssh(1), accept(2), bind(2), connect(2), listen(2), socket(2), ip(4), ip6(4), tcp(4), udp(4)