Simply put, it is easy to use these two sz/rz tools to achieve the file transfer (send and receive) between Linux and Windows, the speed is about 10kb/s, suitable for small and medium-sized files. Rz/sz transferring data via Zmodem protocol
In general, most of the Linux server through the SSH client for remote login and management, using SSH login to the Linux host, how to quickly and the local machine for file interaction, that is, upload and download files to the server and local;
The two commands associated with SSH can be easily manipulated:
SZ: Send the selected file (send) to the local machine
RZ: Run this command will pop up a file Selection window, from the local select File upload to the server (receive)
Rz,sz is the command-line tool that Linux/unix Zmodem file transfer with Windows
the Windows side needs to support Zmodem TELNET/SSH clients (such as SECURECRT)
Run the command RZ, that is, to receive the file, SecureCRT will pop up the file selection dialog box, select the file and close the dialog box, the file will be uploaded to the current directory
Note: Using RZ alone will have two problems: Upload interrupt, upload file changes (MD5 different), the solution is to upload is rz-be, and remove the popup dialog box "Upload files as ASCII" before the check.
-b binary uploads the download in binary mode, does not interpret the character as ASCII
-E force escape all control characters, such as Ctrl+x,del, etc.
Run the command sz file1 file2 is to send files to Windows (the saved directory can be configured) more convenient than the FTP command, and the server does not have to open the FTP service
Ps:linux on the Rz/sz these two gadgets installed lrzsz-x.x.xx.rpm can be.
Of course, you can also set up the directory:
Set up the default directory for uploads and downloads in SECURECRT
Options–>session options–>file transfer can be set to upload and download the directory
The rest of you just log in to the Linux terminal with SECURECRT:
Send file to client: SZ filename
Zmodem receive can start on its own.
Upload files from client to Linux server:
As long as the server execution: RZ
Then select the file to send in SecureCRT, protocol Zmodem
Introduction to the File Transfer tool Rz/sz (LRZ/LSZ) between Linux and Windows
"What is Rz/sz (LSZ/LRZ)"
Simply put, it is easy to use these two sz/rz tools to achieve the file transfer (send and receive) between Linux and Windows, the speed is about 10kb/s, suitable for small and medium-sized files. RZ/SZ transmits data through the Zmodem protocol.
"Why use Rz/sz?"
Common Linux and the method of file sharing between windows, mainly the establishment of NFS implementation of file sharing, and TFTP and other methods, but all very cumbersome, and if only small files (dozens of k, hundreds of k), then directly with the RZ/SZ, it is extremely convenient. Big file words, still want to consider above said, other sharing method, after all, Rz/sz speed only about 10K, transfer big file will be exhausted people's ...
"How to use"
(1) Under Windows, connect the COM port to the Development Board with SECURECRT (or a hyper-terminal that comes with Windows), or connect to a Linux server with protocols such as SSH.
(2) on the Linux side, after installing the Rz/sz (LRZ/LSZ) tool (embedded development, most of the compiled Rz/sz tools have been put into the rootfs, the ordinary Linux system, if not, you can download the source code, their own installation), you can directly run Rz/sz, The implementation and file transfer between Windows:
A. Copy/download files from Windows to Linux (Development Board):
After running RZ, automatically pops up the File selection dialog box under Windows, selects the corresponding file, adds, and then determines, starts the transfer, and copies the files in Windows to Linux.
B. copy files from Linux to a folder in Windows:
The SZ file_name can be used to copy files from the current folder of Linux file_name to the corresponding directory in Windows, where the Windows directory is set by the tool you are currently running.
Here I use SECURECRT, the specific change rz upload/sz Download The default path method:
Right-click the session, Terminal, Xmodem/zmodem->directories:
Upload: The path you want to set
Download: The path you want to set
Here are the additions:
[commonly used in SECURECRT SSH]
Yum Install Lrzsz-y
Note: Rhel sz can be used directly after the system is installed.
Method Two: Source file compilation method
Installation configuration for CentOS x.x version Lrzsz
Copy CodeThe code is as follows:
Mkdir-p/usr/src/tools
Cd/home/ryan/tools
wget http://down1.chinaunix.net/distfiles/lrzsz-0.12.20.tar.gz
Tar zxvf lrzsz-0.12.20.tar.gz
CD lrzsz-0.12.20
./configure--prefix=/usr/local/lrzsz
Make
Make install
Cd/usr/bin
Ln-s/usr/local/lrzsz/bin/lrz RZ
Ln-s/usr/local/lrzsz/bin/lsz SZ
Rz
Method 3:rpm Installation:
RPM IVH lrzsz-x.rpm (go to the disc to find)
Skip over here.
Example: A student encountered rz,sz upload download problem
RZ Normal, sz cannot download file to local. But the students still confused, do not know why.
Problem and resolution process:
[Code]
[email protected] ~]# which SZ
/usr/bin/sz
[Email protected] ~]# Ll/usr/bin/sz
lrwxrwxrwx 1 root root 6 2010/usr/bin/sz-/usr/local/lrzsz/bin/lrz
#===> here, the SZ link to sz---/USR/LOCAL/LRZSZ/BIN/LRZ is clearly seen. It should be lsz.
[Email protected] ~]# rm-f/usr/bin/sz
[email protected] ~]# which SZ
/usr/bin/which:no sz in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin :/usr/bin:/root/bin)
[email protected] ~]# LL
Total 52
-RW-------1 root root 994 Dec 6 anaconda-ks.cfg
-rw-r--r--1 root root 26403 Dec 6 Install.log
-rw-r--r--1 root root 4369 Dec 6 Install.log.syslog
[Email protected] ~]# ln-s/usr/local/lrzsz/bin/lsz/usr/bin/sz
#===> Modify link sz--/usr/local/lrzsz/bin/lsz
[Email protected] ~]#/USR/LOCAL/LRZSZ/BIN/LSZ Install.log
Rz
Starting Zmodem transfer. Press CTRL + C to cancel.
Transmitting Install.log ...
100% KB kb/s 00:00:01 0 Error
[[Email protected] ~] #ll/usr/bin/sz
lrwxrwxrwx 1 root root 08:00/usr/bin/sz-/usr/local/lrzsz/bin/lsz
[email protected] ~]# LL
Total 52
-RW-------1 root root 994 Dec 6 anaconda-ks.cfg
-rw-r--r--1 root root 26403 Dec 6 Install.log
-rw-r--r--1 root root 4369 Dec 6 Install.log.syslog
[Email protected] ~]# sz Install.log
Rz
Starting Zmodem transfer. Press CTRL + C to cancel.
Transmitting Install.log ...
100% KB kb/s 00:00:01 0 Error
It's OK.
Easily upload and download files on Linux tools RZ and SZ use introduction