Use RZ, SZ, and SSH in Linux

Source: Internet
Author: User

1. share data with Linux in VMware.

1.1 install VMware Tools

1.2 choose VM> Settings...> Options> shared folders from the VM menu.

# Select "always enabled"

# Add... --> select the local shared directory of a person in Windows

1.3 In Linux, enter the/mnt/HGFS/Shared Folder/the shared folder used by VMware and windows,

You can share files here automatically.

Find or download from the network in the installation disk

Lrzsz-0.12.20-16.rpm

Run
[Root @ localhost temp] # rpm-IVH lrzsz-0.12.20-22.1.i386.rpm

Warning: lrzsz-0.12.20-22.1.i386.rpm: Header V3 DSA Signature: nokey, key ID 37017186

Preparing... ######################################## ### [100%]

1: lrzsz ####################################### #### [100%]

Generally,LinuxServerMostly throughSSHClient for remote login andManagementAfter logging on to the Linux host using SSH, how can we quickly interact with files on the local machine, that is, uploading and downloading files to the server and local machine;
Two commands related to SSH can provide convenient operations:
SZ: Send the selected file to the Local Machine
RZ: running this command will pop up a file selection window, from the local selection file upload to the server (receive)

Rz, SZ is the same as Linux/UnixWindowsCommand line tool for zmodem file transmission

Windows must support zmodem Telnet/SSH clients (such as securecrt)

Run the RZ command to receive the file. securecrt will pop up the file selection dialog box. After selecting the file, close the dialog box and the file will be uploaded to the current directory.

Note: If you use RZ separately, there will be two problems: the upload is interrupted, and the Upload File changes (MD5 is different). The solution is to use RZ-be for uploading, remove the check box before "upload files as ASCII" in the pop-up dialog box.
-B binary files are uploaded and downloaded in binary format. The characters are not interpreted as ASCII.
-E forces escape to control all characters, such as Ctrl + X and Del.

Running command SZ file1 file2 is to send files to Windows (the saved directory can be configured) is much more convenient than FTP command, and the server no longer needs to enable FTP service

PS: Linux on the RZ/SZ these two gadgets install the lrzsz-x.x.xx.rpm.

Of course, you can also set the directory:

Set the default directory for upload and download in securecrt.
Options-> session options-> File Transfer allows you to set the upload and download directories.
For the rest, you only need to log on to the Linux terminal using securecrt:
Send the file to the client: SZ filename
Zmodem reception can be started by itself.
Upload files from the client to the Linux Server:
As long as the server executes: RZ
Then select File Sending 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, the two sz/Rz tools can be easily used to implement file transmission (sending and receiving) between Linux and Windows at a speed of about 10 kb/s, suitable for small and medium files. Rz/SZ transmits data through the zmodem protocol.

[Why should I use RZ/SZ]

The file sharing methods between Linux and Windows mainly involve creating NFS for file sharing and TFTP, but they are troublesome. If they are only small files (dozens of K, hundreds of K), so the direct use of RZ/SZ, it is extremely easy. For large files, we still need to consider the other sharing methods mentioned above. After all, the speed of RZ/SZ is only about 10 K, and uploading large files will be exhausting...

[How to use]

(1) In Windows, use securecrt (or a Windows Super Terminal) to connect to the COM port to the Development Board, or use SSH or other protocols to connect to the Linux server.

(2) On the Linux end,InstallAfter the RZ/SZ (lrz/lsz) tool (EmbeddedDuring development, most of the compiled RZ/SZ tools have been put into rootfs. For general Linux systems, if not, you can downloadSource codeYou can directly run RZ/SZ to implement file transfer between windows and windows:

A. Copy/download files from windows to Linux (Development Board ):

After running RZ, the file selection dialog box in Windows is displayed automatically. After selecting the corresponding file, add the file, and click OK, transfer the file in windows and copy it to Linux.

B. Copy files from Linux to a folder in Windows:

Run SZ file_name to copy the file file_name in the current Linux folder to the corresponding directory of Windows. The windows directory is set by the tool you are running.

Here I use securecrt. Specifically, the method for changing the default path for RZ upload/SZ download is as follows:

Right-click the current session-> session options-> terminal-> XMODEM/zmodem-> directories:

Upload: the path you want to set

Download: the path you want to set

 

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.