RZ and SZ upload and download files on the client
Use RZ and SZ commands to simulate software at the terminal, such asXshell、SecureCRT、PuTTYIt is very convenient to upload and download files
Test lrzsz package is installed
Lrzsz is a program that can replace FTP upload and download in Linux. What we call upload and download host program here is it. RZ and SZ are the functional commands provided by lrzsz
Test installation
If input at the terminalrz, as shown in the figure below, it indicates that lrzsz software package has not been installed
Tool installation
$ yum install lrzsz
Upload file (RZ)
The following two situations are commonly used to upload files
(1) . upload new files
(2) . upload an existing file with the same name
Upload new file
Terminal inputrzPress afterenterenter key
$ rz
stayopenIn the file dialog box, select a file and clickopen(you can also double-click the file directly)
displayfile transferProgress dialog box
Upload an existing file with the same name
AndUpload new fileThe only difference is to add one more-yOption to overwrite the uploaded file
PS: if not added-yOption, but there is a file with the same name on the server, then the upload will not succeed
$ rz -y
Instructions for uploading files:
When uploading multiple files, please package and upload them, and then unzip them, which is convenient and fast
Download file (SZ)
Download File UsageszFollowed by file path and file name, plusenterPress enter to complete the operation
# for instance
$ sz /root/app.js
Select the file saving path and click “OK” to download the file
These two commands are very efficient, convenient and fast to use. After getting used to them, you will feel like what xftp and other upload and download tools are weak!
Oh, by the way, don’t ask me why you always use the root user, because I use the virtual machine (^ B ^). Learn and test. Play as you want. If you break the snapshot, go directly to it, and then you can’t reinstall it