Main / Netcat
-n = no resolution of names examples: nc -vvnul 5100 nc6 -vvnul --no-reuseaddr -s 1.1.1.1 -p 5000 cat filename | nc6 -vn --send-only 1.1.1.1 5000 nc6 -vnl -s 1.1.1.1 -p 5100 (this is a way to specify which interface to listen on, so port can be reused) nc6 is the newer version of netcat; nc6 specific options --noreuse-address = socket option for listen mode InstallationThere are two flavors of netcat, plus the more modern netcat6. nc6 has a compile problem, with the -C option being disabled, and it only works with the openBSD version Multiple TCP ConnectionsIf you are using open-squirt-close methods from a client using nc as a server, note that a listening netcat will keep those connections open for a while even after you close the socket on the client side. There appears to be a default limit of three lingering connections and you'll hang your client trying to make a fourth. What you need is the -k option to keep looking for connections after one dies, and depending on how fast you are going you'll need the -w <seconds> option to shorten the time the server waits to finally kill a connection. If you make the timeout short enough, you should be able to keep re-using those three slots indefinitely. nc -vvnlk -w 10 192.168.1.99 8080 |