转自:http://www.cnblogs.com/halfacre/archive/2012/05/01/2477710.html
rz,sz是Linux/Unix同Windows进行ZModem文件传输的命令行工具
优点:比ftp命令方便,而且服务器不用打开FTP服务。
sz:将选定的文件发送(send)到本地机器
rz:运行该命令会弹出一个文件选择窗口,从本地选择文件上传到Linux服务器
1、下载rzsz-3.48.tar.gz
wget http://freeware.sgi.com/source/rzsz/rzsz-3.48.tar.gz
2、解压tar zxf rzsz-3.48.tar.gz
解完后居然是在src目录。
3、安装
cd src
make posix
4、添加指令
cp rz sz /usr/bin/
其他问题:
1.去掉"UNREGISTERED COPY"提示
**** UNREGISTERED COPY *****
Please read the License Agreement in rz.doc
解决方法:
修改Makefile第四行OFLAG= -O 为 OFLAG= -O -DREGISTERED
2.1.如果要移植到ARM中使用,需要修改Makefile.如下:
#vi Makefile
修改CC=arm-linux-gcc
保存退出
#make posix
我使用之后的问题:
[wz@DMZ-centos1 Default]$ rz -by
Receive Files and Commands with ZMODEM/YMODEM/XMODEM Protocol
Usage: rz [-v] [-wN] [-tT] (ZMODEM)
or rb [-avy] [-tT] (YMODEM)
or rc [-avy] [-tT] file (XMODEM-CRC)
or rx [-avy] [-tT] file (XMODEM)
Supports the following incoming ZMODEM options given to the sending program:
compression (-Z), binary (-b), ASCII CR/LF>NL (-a), newer(-n),
newer+longer(-N), protect (-p), Crash Recovery (-r),
clobber (-y), match+clobber (-Y), and append (-+).
rz 3.48 01-27-98 for POSIX by Chuck Forsberg, Omen Technology INC
"The High Reliability Software"
Copyright (c) 1997 Omen Technology INC All Rights Reserved
See rz.doc and README for option descriptions and licensing information.
This program is designed to talk to terminal programs,
not to be called by one.
[wz@DMZ-centos1 Default]$
当要上传时没有弹出窗口,只是出了一大串提示。