文件传输
1. 介绍¶
工欲善其事,必先利其器。关于windows和Linux之间文件互传的方式,群里小伙伴已经问了N次,为了避免多次再问,我总结一下。 我极力推荐使用xshell,傻瓜式的,小文件绝对是王者,不是青铜。大文件传输可以考虑使用其他分sftp等软件。
- centos 系统
yum install -y lrzsz
[root@master01 ~]# yum install -y lrzsz Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * epel: mirrors.yun-idc.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com Package lrzsz-0.12.20-36.el7.x86_64 already installed and latest version Nothing to do
- ubuntu 系统
apt-get install -y lrzsz
root@leco:~# apt-get install -y lrzsz 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 lrzsz 已经是最新版 (0.12.21-10~build0.16.04.1)。 升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 287 个软件包未被升级。
- 检查
[root@master01 ~]# which sz /usr/bin/sz [root@master01 ~]# which rz /usr/bin/rz
只要有即可,不管你安装在哪里
对号入座,根据自己操作系统安装该软件。务必安装好该软件。
这个命令仅仅使用文件不适用目录[目录压缩后即可]
2. Windows文件发送到Linux¶
直接将windows上文件拖到xshell界面上即可,传输。
2. Linux文件发送到Windows¶
直接在终端上命令sz 文件