Home >System Tutorial >LINUX >Detailed explanation on the installation and use of rz and sz commands to transfer files

Detailed explanation on the installation and use of rz and sz commands to transfer files

WBOY
WBOYOriginal
2024-07-19 16:49:07741browse

rz、sz 命令传输文件的安装与使用方法详解

To use rz and sz commands to transfer files, you need to install lrzsz on the server:

yum -y install lrzsz

How to use the commands sz and rz

The r in rz means received. When rz is entered, it means that the server receives the file, and the official file is uploaded from the local to the server.

The s in sz means send. When sz is entered, it means that the server wants to send files, which means sending files from the server to the local, or downloading files locally from the server.

Note: Whether it is sent or received, the action is initiated on the server.

rz Usage:

linux命令大全_linux命令_什么是linux命令

Note: When uploading, if the uploaded Linux directory has a file with the same name, it will be difficult to upload. You need to delete the file with the same name on Linux first.

Enter rz and press Enter What is the linux command? The file selection dialog box linux format command will appear. Select the file to be uploaded. Multiple files can be specified at one time. Red flag linux6.0, the path uploaded to the server is the current execution rz The directory for the command. The file dialog box is as follows:

Multiple files can be selected.

sz Usage:

Download a file: szfilename

Download multiple files: szfilename1filename2

Download all files in the dir directory, excluding folders under dir: szdir/*

Using szfilename1fiename2 on xshell will pop up a dialog box What is the linux command? You can download it to the local folder you specify:

linux命令_什么是linux命令_linux命令大全

The reason why the dialog box pops up is because in the session property settings, "Always ask before downloading" is checked

If you use SecureCRT, the dialog box will not pop up because the SecureCRT session properties do not have the "Always ask before downloading" option to check:

linux命令_什么是linux命令_linux命令大全

The above is the detailed content of Detailed explanation on the installation and use of rz and sz commands to transfer files. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn