Linux rz sz - 上传下载工具

[size=large]Linux上的文件上传/下载工具rz和sz[/size]

Rz (receive zmodem) receives files with the ZMODEM batch protocol.
rz:运行该命令会弹出一个文件选择窗口,从本地选择文件上传到服务器
Sz (Send zmodem) sends one or more files with ZMODEM protocol.
sz:将选定的文件发送(send)到本地机器

【ZMODEM】
Xmodem, Ymodem and Zmodem
Xmodem sends 128 bytes and a checksum, waits for a Acknowledgment to say all is well and sends the next block. If a negative acknowledgement is received or if no ACK or NAK ever appears then the block is sent again.
Xmodem is a simple protocol, as you would expect of a program written for 8-bit computers running CP/M. It has lots of inefficiencies and minor problems, such as rounding up the file size to the next 128 byte boundary. These deficiencies lead to an evolution of the protocol with revisions of Xmodem, then Ymodem and finishing with Zmodem. Zmodem is substantially faster than Xmodem and has no niggling problems. The Zmodem protocol is substantially more complex than the Xmodem protocol, but since we only seek to at most compile the code, that complexity need not concern us.
-----------------------
xmodem每次只能传输128b并且要校验,效率很低。随着发展出现了ymodem和现在的zmodem。rz和sz是基于zmodem的,所以putty(不支持zmodem)不能使用这两个命令。


[size=large]【安装】[/size]
测试环境:VMware RedHat5.1 Kernel:2.6.18-53.el5
yum install lrzsz


[size=large]【配置】[/size]
在SecureCRT设置一下上传和下载的默认目录
options–>session options --> X/Y/Zmodem
[img]http://dl2.iteye.com/upload/attachment/0097/4481/4db768ec-0c29-351f-a859-89bbbb377c0a.jpg[/img]

[size=large]【使用】[/size]
[size=medium]环境:SecureCRT6.5[/size]
运行rz后,会自动弹出WIndows下的文件选择对话框,选择对应文件后,添加,然后确定,就开始传输,将windows中的文件,拷贝到Linux中了。
[img]http://dl2.iteye.com/upload/attachment/0097/4474/c34c446c-f066-3548-84de-8ebf3e27506e.jpg[/img]

执行sz file_name 就可以将Linux当前文件夹下的文件file_name拷贝到Windows的对应目录中了,其中,Windows目录是由你当前运行的工具中设定的。
[img]http://dl2.iteye.com/upload/attachment/0097/4476/ce05ef94-66f0-3785-b05f-896d0cb55155.jpg[/img]

【参考】
[url]http://blog.csdn.net/itegel84/article/details/5793575[/url]
[url]http://oldboy.blog.51cto.com/2561410/588592[/url]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值