Detailed explanation of the usage of rz and sz commands in Linux

In Linux, the rz and sz commands allow the development board and the host to transfer files through the serial port. Let's briefly introduce examples of the rz and sz commands.

 

rz, sz are command line tools for ZModem file transfer between Linux/Unix and Windows.
The advantage is that there is no need to open another sftp tool to log in to upload and download files.

 

sz: Send the selected file to the local machine
rz: Running this command will pop up a file selection window, select the file from the local and upload it to the Linux server

Installation command:

yum install lrzsz

Send file from server to client:

sz filename

Upload a file from the client to the server:

rz

Select the file in the pop-up box, the user and group who uploaded the file are the currently logged in user

SecureCRT sets the default path:

Options -> Session Options -> Terminal -> Xmodem/Zmodem ->Directories

Xshell sets the default path:

Right click session -> Properties -> ZMODEM -> Receive Folder

Test: The
development board receives files:
1. Enter the directory where the development board wants to receive files
2. The development board executes the command # rz
3. Under minicom, hold down the Ctrl+A key and press the Z key
4. Press the S key Select the file to send
5. Select zmodem, press Enter to confirm
6. Use space to select the file to be sent by the host, press Enter to confirm
7. Press any key to return after the transfer is complete

The development board sends files:
1. Enter the directory where the development board wants to send the file
2. Enter the directory where the host wants to receive the file
2. The host executes the command # rz
3. The development board executes the command # sz filename

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326941810&siteId=291194637