Linux下nc命来实现文件传输

发送端:
cat test.txt | nc -l -p 6666
或者nc -l  -p 6666 < test.txt                    有些版本不要在 -p
【监听6666端口,等待连接】(设发送端IP为10.20.133.152)
接收端:
nc 10.20.133.152 6666 > test1.txt
如上面的操作,即可将文件test.txt从发送端传送到接收端,保存为test1.txt

 

posted on 2015-02-11 15:58  mingaixin  阅读(3275)  评论(0编辑  收藏  举报