linux 服务器间文件互传方法,linux服务器文件
linux 服务器间文件互传方法,linux服务器文件
scp命令
1.本机->远程服务器
scp -r /home/name/hello root@192.168.0.1:/home/name
/home/name/hello为源目录,test2为目标目录,root@192.168.0.1为远程服务器的用户名和ip地址。
-r 表示递归发送,不加可以发送一个文件
2.远程服务器->本机
scp -r root@192.168.0.1:/home/name/hello0 /home/name/hello1
root@192.168.0.1为远程服务器的用户名和ip地址,/home/name/hello0为源目录,/home/name/hello1
netcat工具
需要安装
发送
nc -l 12345 < ttt
接收
nc -n ip 12345 > ttt
评论暂时关闭