Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the rz and sz commands of Linux

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly analyzes the relevant knowledge points about how to use the rz and sz commands of Linux. The content is detailed and easy to understand, and the operation details are reasonable, so it has a certain reference value. If you are interested, you might as well follow the editor to have a look, and follow the editor to learn more about "how to use the rz and sz commands of Linux".

1. Rz command

1.1 introduction to commands

The rz command (Receive ZMODEM), using the ZMODEM protocol, bulk uploads local files to a remote Linux/Unix server, and note that folders cannot be uploaded.

When we use virtual terminal software such as XShell, SecureCRT, or PuTTY to connect to the remote server, use the rz command to upload local files to the remote server.

After entering rz enter, a file selection dialog box appears to select the files to be uploaded. You can specify multiple files at a time, and the path to the server is the directory where the rz command is currently executed.

In addition, the default loading path and download path can be set when the virtual terminal software is uploaded.

For example, upload and download directories can be set under SecureCRT software-> Options-> session options-> X/Y/Zmodem.

1.2 Command format

Rz [OPTIONS]

1.3 option description

-+,-- append appends the contents of the file to the existing file of the same name-a,-- ascii transfers-b in text,-- binary transfers in binary mode. It is recommended to use-- delay-startup N to wait for N seconds-e,-- escape to escape all control characters. It is recommended to use-E,-- rename to rename the newly uploaded file if it already has the same name. Suffix-p,-protect with dots and numbers is valid for ZMODEM protocol, skip-Q,-- quiet quiet execution if the target file already exists Do not output prompt information-v,-- verbose output prompt information during transmission-y,-- overwrite has the same name file instead of-X,-- xmodem uses XMODEM protocol-- ymodem uses YMODEM protocol-- Z,-- zmodem uses ZMODEM protocol-- version displays version information-- h,-- help displays help information.

The above are common command options. For more descriptions of the options, see the rz help manual.

1.4 Common examples

(1) replace the existing file with the same name by binary and escaping the control character.

Rz-bye

2.sz command

2.1 introduction to commands

The sz command (Send ZMODEM) downloads multiple files locally from a remote server through the ZMODEM protocol.

Note that you cannot download a folder. If you download a folder, please package it before you download it.

2.2 Command format

Sz [OPTIONS] FILES

2.3 option description

The command options are basically the same as rz. Please refer to the command options of rz above or manual of sz, or run the command sz-h to see.

2.4 Common examples

(1) download multiple files

Sz file1 file2 file3 measured sz does not need the option-bye, use XShell, can also correctly transfer text files and binary files.

3.FAQ

(1) how do rz commands and sz commands upload and download folders?

Unfortunately, as far as I know, rz command and sz command can not directly upload or download folders, you can first package the folders as files upload and download.

(2) often confuse rz and sz, how to remember correctly?

Rz is called the upload tool because we focus on the local machine.

From the perspective of a remote server, it is easy to understand why rz is called Receive ZMODEM because the server needs to receive files from the local machine.

The sz command indicates that files are sent locally from the server, also known as downloading files.

About "Linux rz, sz command how to use" is introduced here, more related content can search previous articles, hope to help you answer questions, please support the website!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report