Last updated 4 years ago
Was this helpful?
有的时候由于内网限制,开发及其不能直接通过ftp连接线上服务器,这个时候如果想要互传文件的话可以使用netcat。
首先windows先安装netcat:
,LZ下载的是netcat 1.12,解压。
netcat 1.12
很简单,将解压出来的所有文件copy到C:\Windows\System32文件夹下。
C:\Windows\System32
打开cmd:
# 1.Linux服务器向windows传输文件 # Windows上命令如下 nc -l -p {port} > file.log # Linux服务器命令如下 nc {Windows IP} {port} < file.log # 这样就把Linux上的file.log文件原封不动的传输到Windows本地上了。 # 2.Windows向Linux服务器传输文件,只需要把上面的两个箭头 > 和 < 反过来写就行了。