一、linux 与 windows 文件传输: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”前的勾选。
-b binary 用binary的方式上传下载,不解释字符为ascii
-e 强制escape 所有控制字符,比如Ctrl+x,DEL等

运行命令sz file1 file2就是发文件到windows上(保存的目录是可以配置) 比ftp命令方便多了,而且服务器不用再开FTP服务了

PS:Linux上rz/sz这两个小工具安装lrzsz-x.x.xx.rpm即可。

用binary和ascii上传究竟有什么区别呢?引一段E文:
Ascii or Binary? The general rule of thumb is if you can view the file in a text editor like notepad (ie. .html, .js, .css files etc) you should upload in ASCII mode, most

others (including images, sound files, video, zip files, executable’s etc) should be uploaded in Binary.
Exceptions to the Rule It seems all things related to computers have exceptions to the rules. Yes, this is yet another case of it.
If your text files contain international characters (ie. Chinese or Japanese text), they are to be uploaded as binary. The reason is that ascii takes into account differences

between DOS and UNIX files (7 bits) but it doesn’t do well with text using higher bits.
Why Does It Matter What Mode You Transfer Files With? If you upload images etc. as ascii you’ll end up with corrupted files. Some browsers seem capable of figuring it out, but

not all… and not all the time. Netscape is much more picky, so you’d end up with broken or missing pictures for your Netscape users. (Yup, I learned this the hard way)
Same thing with uploading text files as binary. While this is less important for html files, scripts will have a HUGE problem with it and will just not work. This is the most

common cause of the “Server 500 Error - Malformed Headers”, and other equally unlovely errors that have caused many a webmaster to bang their heads against their computers.
So What Does Uploading In ASCII Do? I’d wondered this for a while and finally decided to learn why uploading in ascii is so important for some file types. What I found out is

that different Operating System’s use different ways to specify that a line has ended. So if you’re using a different operating system than your server (which is very likely),

the files will have extra characters at the end of each line that the server doesn’t recognize. So it’ll usually print them out resulting in script errors.
Setting Your FTP Program to “Auto”Most FTP programs have the option to set your upload to auto. What this usually does is compare the file type you’re transferring against a

list of known file types and set it to binary or ascii upload on its own.
By default, most FTP programs will have a pre-set list of files to be transferred in ascii and will upload / download everything else in binary. (These settings are in different

places depending on the program you are using. Check the “Read Me” file or their Website if you can’t find it.) Be sure to double check that the files you want to transfer are

in the appropriate list.
SummaryASCII? Files .htm .html .shtml .php .pl .cgi .js .cnf .css .forward .htaccess .map .pwd .txt .grp .ctl
Binary Files .jpg .gif .png .tif .exe .zip .sit .rar .ace .class .mid .ra .avi .ocx .wav .mp3 .au
引用:http://cache.qihoo.com/wenda.php?do=snap&act=fetchHtmlsnap&m=4ca30d60d3fe8a9763c0da1d9894a8ed&surl=http%3A%2F%2Fhi.baidu.com%2Frenyangok%2Fblog%2Fitem%2Fe91779f1ab83d4a8a40f52e9.html&kw=SecureCRT
开发平台迁移到windows,编码迁移到gbk,服务器是linux,需要频繁使用secureCRT,还需要登陆relay机器,找到rz,sz命令,终于不用apache来传送文件了,嘿嘿

先设定SecureCRT上传下载文件保存路径
options -> session -> Xmodem/Zmodem -> upload / download -> ok

然后确认一下系统中是否有 sz rz 这两个命令(FreeBSD下命令是 lrz、lsz)
如果有就跳过这里,如果没有,则安装lrzsz 在网上可以很容易找到,比如说http://download.chinaunix.net/down.php?id=12772&ResourceID=6293&site=1
下载之后是常规安装方法,解压,configure;make;make install

我下载的是src.rpm包,具体安装方法可以参考这里如何安装.src.rpm软件包

1、将linux上文件传到PC机上
shell> sz /etc/rc.local

例:
[root@test root]# sz /etc/rc.local
rz
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring rc.local…
100% 464 bytes 464 bytes/s 00:00:01 0 Errors

2、将PC机上文件传到linux上
shell> rz
选择要传送的文件,确定。

引用:http://cache.qihoo.com/wenda.php?do=snap&act=fetchHtmlsnap&m=66537e9dc2c0f9ace2bdd72d8d7e7bac&surl=http%3A%2F%2Fhi.baidu.com%2Fismayday%2Fblog%2Fitem%2F1c2142a905a819fb1e17a29f.html&kw=SecureCRT

我使用的是SecureCRT5.5
SecureCR下的文件传输协议有ASCII、Xmodem、Zmodem
文件传输协议
文件传输是数据交换的主要形式。在进行文件传输时,为使文件能被正确识别和传送,我们需要在两台计算机之间建立统一的传输协议。这个协议包括了文件的识别、传送的起止时间、错误的判断与纠正等内容。常见的传输协议有以下几种:

ASCII:这是最快的传输协议,但只能传送文本文件。

Xmodem:这种古老的传输协议速度较慢,但由于使用了CRC错误侦测方法,传输的准确率可高达99.6%。

Ymodem:这是Xmodem的改良版,使用了1024位区段传送,速度比Xmodem要快。

Zmodem:Zmodem采用了串流式(streaming)传输方式,传输速度较快,而且还具有自动改变区段大小和断点续传、快速错误侦测等功能。这是目前最流行的文件传输协议。

除以上几种外,还有Imodem、Jmodem、Bimodem、Kermit、Lynx等协议,由于没有多数厂商支持,这里就略去不讲。
SecureCRT可以使用linux下的zmodem协议来快速的传送文件.

你只要设置一下上传和下载的默认目录就行
options->session options ->Terminal->Xmodem/Zmodem 下
在右栏directory设置上传和下载的目录

使用Zmodem从客户端上传文件到linux服务器
1.在用SecureCRT登陆linux终端.
2.选中你要放置上传文件的路径,在目录下然后输入rz命令,SecureCRT会弹出文件选择对话框,在查找范围中找到你要上传的文件,按Add按钮。然后OK就可以把文件上传到linux上了。
或者在Transfer->Zmodem Upoad list弹出文件选择对话框,选好文件后按Add按钮。然后OK窗口自动关闭。然后在linux下选中存放文件的目录,输入rz命令。liunx就把那个文件上传到这个目录下了。

使用Zmodem下载文件到客户端:
sz filename
zmodem接收可以自行启动.下载的文件存放在你设定的默认下载目录下.

又记:
rz,sz是Linux/Unix同Windows进行ZModem文件传输的命令行工具windows端需要支持ZModem的telnet/ssh客户端,SecureCRT就可以用SecureCRT登陆到Unix/Linux主机(telnet或ssh均可)O 运行命令rz,即是接收文件,SecureCRT就会弹出文件选择对话框,选好文件之后关闭对话框,文件就会上传到当前目录 O 运行命令sz file1 file2就是发文件到windows上(保存的目录是可以配置) 比ftp命令方便多了,而且服务器不用再开FTP服务了

原文

转载于:https://www.cnblogs.com/nwf5d/archive/2010/09/17/1829584.html

解决securecrt rz 上传rar,gif文件不正确问题【转】相关推荐

  1. SecureCRT使用及解决securecrt rz 上传rar,gif文件不正确问题

    安装SecureCRT版本为SecureCR+SecureFX 的整合版,下载见 http://www.portablesoft.org/securecrt-securefx-integrated/ ...

  2. 每天一个linux命令(文件上传下载文件操作):【转载】用SecureCRT来上传和下载文件...

    用SSH管理linux服务器时经常需要远程与本地之间交互文件.而直接用SecureCRT自带的上传下载功能无疑是最方便的,SecureCRT下的文件传输协议有ASCII.Xmodem.Zmodem. ...

  3. securecrt传输mysql安装包_用SecureCRT来上传和下载文件

    在使用SecureCRT上传下载之前需要给服务器安装lrzsz: yum -y install lrzsz rz中的r意为received(接收),输入rz时.意为服务器接收文件,既将文件从本地上传到 ...

  4. 解决常用浏览器上传与下载文件中问乱码问题

    解决浏览器下载与上传文件中问乱码问题 问题: 我们在写后端Servlet程序处理下载与上传问题时 我们知道下载的文件名,可以与本地文件名不同(假如你的浏览器访问的时本地资源) 如果说此时你的文件名是中 ...

  5. Android之解决PC浏览器上传表单文件到手机服务器read数据错误导致有时候下载到手机的文件打开文字错乱问题

    1 .问题 手机客户端app通过java socket写了一个服务器,然后PC端通过浏览器访问服务端显示上传页面(这些资源都在手机端),然后其中有一个功能是PC端上传文件到手机服务器,然后把这个文件下 ...

  6. linux rz 无法上传文件,linux rz上传文件及出错解决方案

    在把Windows上的文件传至Linux端时用到SecureCRT,一般小文件都没有问题,文件太大时则出现了上传后的文件只有几K大小,当然大于2个G的是不可能传的上去的了.对于几百M到1G多的大文件要 ...

  7. 利用SecureCRT上传、下载文件(使用sz与rz命令)

    利用SecureCRT上传.下载文件(使用sz与rz命令) 借助securtCRT,使用linux命令sz可以很方便的将服务器上的文件下载到本地,使用rz命令则是把本地文件上传到服务器. 其中,对于s ...

  8. Linux中使用SecureCRT上传、下载文件命令sz与rz用法实例

    借助securtCRT,使用linux命令sz可以很方便的将服务器上的文件下载到本地,使用rz命令则是把本地文件上传到服务器 其中,对于sz和rz的理解与记忆我用了如下的方法(因为很多时候容易搞混): ...

  9. 在SecureCRT使用sz与rz命令上传、下载文件命令介绍

    在SecureCRT使用sz与rz命令上传.下载文件命令介绍    一.简介 借助securtCRT,使用linux命令sz可以很方便的将服务器上的文件下载到本地,使用rz命令则是把本地文件上传到服务 ...

最新文章

  1. 每日一皮:当你开始研究一个新项目时是这样的吗?
  2. Microsoft Fluent Design System
  3. java map null吗_Java: Map里面的键和值可以为空吗?
  4. 除了PS,原来这个也可以轻松实现图像处理!
  5. 位,字,字节之间关系及关联知识普及
  6. 那些能沉淀自己的人,将会成为最后的赢家
  7. 电池和Adapter切换电路改进实验(转)
  8. python datetime.datetime.now_python时间日期datetime模块
  9. 小程序常用ui库 组件库
  10. 如何保障-数据一致性
  11. 遥感影像公开数据集:deepglobe-road-dataset
  12. 多渔:赚钱,就是专注和刻意练习!
  13. 计算机键盘连接不上,电脑键盘连接不上电脑是怎么回事
  14. 教你操作视频横屏改竖屏的方法
  15. detached entity passed to persist问题与解决方案
  16. 两道非常容易理解错的OSPF问题. 加深理解LSA的概念和ABR/ASBR的概念.
  17. 本地php开发环境出现 cURL error 60
  18. Linux进程的后台运行
  19. 一大早,是什么让技术群发出强人锁男、男上加男、勉为骑男?
  20. 你问西湖水用计算机弹,你问西湖水偷走她的几分美是什么歌,恋人心歌曲介绍...

热门文章

  1. BeautifulSoup4 find_all搜索包含指定文本内容的标签返回空list的问题
  2. (https)nginx - tomcat(http)
  3. QTP的那些事 -– Visual Relation Identifier Feature: How to use in the real world
  4. 笨兔兔的故事——带你了解Ubuntu,了解Linux 杀毒 第十八章
  5. 计划doing.....
  6. [Java 基础]控制语句
  7. 【02】查询优化的技术范围
  8. Linux基础:linux网络接口
  9. SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查
  10. LeetCode1.两数之和