Example of using SecureCRT to upload and download files command sz and rz in Linux

Source: Internet
Author: User
With securtCRT, the linux command sz can easily download files from the server to the local device. The rz command uploads local files to the server.

Here, I use the following methods for understanding and memorizing sz and rz (because it is often easy to mix up ):
In sz, "s" means "send" and tells the client that "I (server)" wants to send the file "send to cilent", which is equivalent to "download" on the client.
The r in rz indicates received, and tells the client that the client is uploading the received ed by cilent file.

Note: The sz and rz commands must be supported by the server. If no command is prompted:


Copy codeThe code is as follows:
-Bash: rz: command not found
-Bash: sz: command not found


You can use yum for installation (Centos as an example ):


Copy codeThe code is as follows:
Yum install lrzsz-y

The following describes the usage of sz and rz:

Sz usage (it is much easier to run the command sz than the ftp command, and the server does not need to enable another FTP service ):

Copy codeThe code is as follows:
# Download an object
Sz filename
# Download multiple files
Sz filename1 filename2
# Download all files in the dir Directory, excluding folders in the dir Directory
Sz dir /*

The location where the downloaded file is stored must be set in securtCRT. The settings are as follows:



Rz usage:

Enter rz in the command terminal and press Enter. the file selection dialog box appears. select the file to be uploaded. multiple files can be specified at a time. the path uploaded to the server is the directory where the rz Command is currently executed.



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.

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.