mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-03-28 21:16:20 +01:00
commit
ec617bd22b
1 changed files with 23 additions and 0 deletions
23
common/nc.md
Normal file
23
common/nc.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# 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
|
||||
|
||||
`cat somefile.txt | nc -l {{port}}`
|
||||
|
||||
- receive a file
|
||||
|
||||
`nc {{ip_address}} {{port}} > somefile.txt`
|
Loading…
Add table
Reference in a new issue