在contos总安装zmodem 亲测
xshell很好用,然后有时候想在windows和linux上传或下载某个文件,其实有个很简单的方法就是rz,sz
rz,sz是便是Linux/Unix同Windows进行ZModem文件传输的命令行工具
windows端需要支持ZModem的telnet/ssh客户端(xshell支持,好像putty不支持),SecureCRT就可以用SecureCRT登陆到Unix/Linux主机(telnet或ssh均可)
运行命令rz,即是接收文件,xshell就会弹出文件选择对话框,选好文件之后关闭对话框,文件就会上传到linux里的当前目录
运行命令sz file 就是发文件到windows上(保存的目录是可以配置) 比ftp命令方便多了,而且服务器不用再开FTP服务了
注意,Linux服务器上要有安装支持zmodem的软件,lrzsz zssh;Linux中文件名是中文名,要是系统的编码是UTF-8的,与Windows的不匹配,下载时不成功,上传时可以的。
以下是安装方法
[root@i5846SFFZ1 /]# cd /etc/yum.repos.d/
[root@i5846SFFZ1 yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo
--2014-10-20 17:25:28-- http://public-yum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... 206.160.170.56, 206.160.170.8
Connecting to public-yum.oracle.com|206.160.170.56|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4550 (4.4K) [text/plain]
Saving to: ?.ublic-yum-ol6.repo?
100%[================================================================================>] 4,550 --.-K/s in 0s
2014-10-20 17:25:30 (163 MB/s) - ?.ublic-yum-ol6.repo?.saved [4550/4550]
[root@i5846SFFZ1 yum.repos.d]# yum search rz
Loaded plugins: security
base | 3.7 kB 00:00
epel | 4.4 kB 00:00
epel/primary_db | 6.3 MB 00:01
extras | 3.3 kB 00:00
ol6_UEK_latest | 1.2 kB 00:00
ol6_UEK_latest/primary | 16 MB 00:12
ol6_UEK_latest 358/358
ol6_latest | 1.4 kB 00:00
ol6_latest/primary | 42 MB 00:34
ol6_latest 26310/26310
rpmforge | 1.9 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 5.4 MB 00:00
epel/pkgtags | 1.3 MB 00:00
==================================================== N/S Matched: rz =====================================================
lrzsz.x86_64 : The lrz and lsz modem communications programs
perl-WWW-Shorten-0rz.noarch : Shorten URL using 0rz.tw
lrzip.x86_64 : Compression program optimized for large files
lrzip-devel.i686 : Development files for Long Range ZIP library
lrzip-devel.x86_64 : Development files for Long Range ZIP library
lrzip-libs.i686 : Long Range ZIP library
lrzip-libs.x86_64 : Long Range ZIP library
lrzip-static.i686 : Static Long Range ZIP library
lrzip-static.x86_64 : Static Long Range ZIP library
rzip.x86_64 : A large-file compression program
Name and summary matches only, use "search all" for everything.
[root@iZ23mcx1f7lZ yum.repos.d]# yum install lrzsz
Loaded plugins: security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package lrzsz.x86_64 0:0.12.20-27.1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================
Installing:
lrzsz x86_64 0.12.20-27.1.el6 base 71 k
Transaction Summary
==========================================================================================================================
Install 1 Package(s)
Total download size: 71 k
Installed size: 159 k
Is this ok [y/N]: y
Downloading Packages:
lrzsz-0.12.20-27.1.el6.x86_64.rpm | 71 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : lrzsz-0.12.20-27.1.el6.x86_64 1/1
Verifying : lrzsz-0.12.20-27.1.el6.x86_64 1/1
Installed:
lrzsz.x86_64 0:0.12.20-27.1.el6
Complete!
一、操作命令
sz aaa.log 下载文件名为aaa.log到本地
rz 上传文件到远程服务器
rz -y 覆盖已存在文件
二、拖放操作
上传,直接把要传的文件拖到命令框中。
下载,在公理化理论框中,选定要传的文件的字符,屏幕会出现一个黄的,点击出现下拉菜单,选下载。
爆款云服务器s6 2核4G 低至0.46/天,具体规则查看活动详情