Netcat is a featured networking utility which reads and writes data across network connections, using the TCP/IP protocol.
It is designed to be a reliable “back-end” tool that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities.


nc 传输文件:

  • 传送文件

发送端:nc -l 6666 < file
接收端: nc host 6666 | pv -L 30m > wrapper


  • 压缩传输一个文件夹

tar zcvf folder.tar.gz folder | nc -l 6666


  1. The GNU Netcat
  2. Linux Netcat 命令——网络工具中的瑞士军刀