1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-10-31 02:18:01 +01:00
tldr/pages/common/nc.md
Agniva De Sarker 3da76e4150 Applying the snake_case convention throughout the repo (#967)
* Applying the snake_case convention throughout the repo

- Also removing the file extension where not needed
- Adding {{ }} on a few old pages

* Addressing concerns

- Added {{ }} where they were missed out
- Removed spaces inside {{ }}
- Reverting "file" to "filename" to make it clearer

* Fixing the comments on nc page
2016-07-22 22:24:06 +02:00

619 B

nc

Reads and writes tcp or udp data.

  • Listen on a specified port:

nc -l {{port}}

  • Connect to a certain port (you can then write to this port):

nc {{ip_address}} {{port}}

  • Set a timeout:

nc -w {{timeout_in_seconds}} {{ipaddress}} {{port}}

  • Serve a file:

nc -l {{port}} < {{file}}

  • Receive a file:

nc {{ip_address}} {{port}} > {{file}}

  • Server stay up after client detach:

nc -k -l {{port}}

  • Client stay up after EOF:

nc -q {{timeout}} {{ip_address}}

  • Port scanning:

nc -v -z {{ip_address}} {{port}}

  • Proxy and port forwarding:

nc -l {{port}} | nc {{hostname}} {{port}}