Centos installation command: yum install -y lrzsz
With XShell, you can easily download files from the server locally using the linux command sz, and use the rz command to upload local files to the server.
Among them, I used the following method for understanding and memorizing SZ and RZ (often easy to confuse):
The S in sz means send, telling the client that I (the server) want to send to cilent, which is equivalent to the client downloading.
The r in rz means received, telling the client that I (the server) want to receive the file received by cilent, which is equivalent to the client uploading.
Remember that both sent and received actions are initiated on the server. We are used to saying upload or download, but in fact, it is not necessary. With these two commands, just think about whether you want to send the file out of the server or receive it from the client.
If you want to upload a file from the client to the server, the server will receive the file back, and the logic is: I (the client) upload, you (the server) receive, using rz.
If you want to download the file from the server (to the client), the server will send the file, the logic is: I download (client), you (the server) send, using sz.
Well, to sum it up in one sentence: I (client) upload, you (server) receive (RZ), I download (client), you (server) send (SZ). |