1. Brief Introduction
With securtCRT, the linux Command sz can easily download files from the server to the local, and the rz command is used to upload local files to the server.
2. Understanding memory
Here, I use the following methods for understanding and memorizing sz and rz (it is often easy to confuse ):
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.
Remember, whether it is send or received,
Actions are initiated on the server.. We are used to uploading or downloading, but it is not necessary. To use these two commands, you only need to think about whether to send the file from the server or connect it to the client. 3. Install lrzsz
First, if the lrzsz package is not installed in our system, it will be reported that the rz and sz commands cannot be found. The installation can solve the problem.
[Cpp]View plaincopy
- [Root @ localhost lamp] # sz tar. sh-bash: sz: command not found
- [Root @ localhost lamp] # rz-bash: rz: command not found
- [Root @ localhost lamp] # yum install lrzsz # CentOS, RHEL Series
- Sudo apt-get install lrzsz # ubuntu Series 3. Simple usage of sz:
Download an object: sz filename
Download multiple files: sz filename1 filename2
Download all files in the dir directory, excluding the folder: sz dir /*Rz usage:
Enter rz and press Enter. The file selection dialog box appears. Select the file to be uploaded. You can specify multiple files at a time,The path uploaded to the server is the directory where the rz command is currently executed..
3. SetSet the default directory for upload and download:
English version: options-session options-X/Y/Zmodem.
Chinese version: Option-session option-X/Y/Zmodem.