The -z flag makes netcat connect without sending data, which is exactly a port probe, and -v reports each open or closed result. Ports are given as a range, 1 through 1000 inclusive, with -w 2 capping the wait per port at two seconds. It is a lightweight alternative to nmap for quick service checks on networks you own.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.