RZ/SZ乱码问题解决

最新使用SecureCRT需要频繁从MAC传输文件到Linux机器上,rz指令在传输小文件时十分好用。随着文本量增大,出现了各种乱码以及传输失败等,有时甚至导致SecureCRT崩溃。下面将简要介绍如何解决这类问题。

linux 与MAC文件传输:rz/sz
ZModem is a full-duplex file transfer protocol that supports fast data transfer rates and effective error detection. ZModem is very user friendly, allowing either the sending or receiving party to initiate a file transfer. ZModem supports multiple file (”batch”) transfers, and allows the use of wildcards when specifying filenames. ZModem also supports resuming most prior ZModem file transfer attempts.

rz,sz是便是Linux/Unix同Windows进行ZModem文件传输的命令行工具。windows端需要支持ZModem的telnet/ssh客户端(比如SecureCRT)运行命令rz,即是接收文件,SecureCRT就会弹出文件选择对话框,选好文件之后关闭对话框,文件就会上传到当前目录
注意:单独用rz会有两个问题:上传中断、上传文件变化(md5不同),解决办法是上传是用rz -be,并且去掉弹出的对话框中“Upload files as ASCII”前的勾选

-a, –ascii-b, –binary 用binary的方式上传下载,不解释字符为ascii-e, –escape 强制escape 所有控制字符,比如Ctrl+x,DEL等rar,gif等文件文件采用 -b 用binary的方式上传。文件比较大而上传出错的话,采用参数 -e如果用不带参数的rz命令上传大文件时,常常上传一半就断掉了,很可能是rz以为上传的流中包含某些特殊控制字符,造成rz提前退出。
此条目发表在linux分类目录。将固定链接加入收藏夹。