Linux--windows: Upload, download command--rz,sz

Source: Internet
Author: User
Tags control characters syslog

In general, most of theLinux 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? , i.e. uploading and downloading 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, ordinary Linux system, if not, you can download the source code , install it yourself), you can run Rz/sz directly, and the file transfer between Windows is implemented:

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

█ Case: 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:

[[email protected] ~]# which sz
/ Usr/bin/sz
lrwxrwxrwx 1 root root dec  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

relative [ 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
-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

relative [email protected] ~] #ll/usr/bin/sz
lrwxrwxrwx 1 root root 08:00/usr/bin/sz-/usr/local/lrzsz/bin/lsz
[email protected] ~]# ll
Total
-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.

Linux--windows: Upload, download command--rz,sz

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.