Transfer files between remote host and local using SecureCRT

Use SecureCRT to upload and download files (using sz and rz commands)
   
    With secureCRT, you can use the linux command sz to easily download files on the server to the local, and use the rz command to upload local files to the server.
 
    Among them, for the understanding and memory of sz and rz, I used the following method (it is easy to confuse it in many cases):
 
    The s in sz means send (send), telling the client that I (the server) want to send the file send to cilent, It is equivalent to the client downloading.
 
    The r in rz means received, which tells the client that I (the server) want to receive the file received by cilent, which is equivalent to the client uploading.
 
    Remember that, whether send or received, the action is initiated on the server. We are accustomed to saying upload or download, in fact, it is not necessary. Using these two commands, just think about whether to send the file from the server or receive it back from the client.
 
    If you want to upload the file from the client to the server, the server will receive the file back, the logic is: I (client) upload, you (server) receive, use rz.
 
    If you want to download the file from the server back (to the client), the server sends the file, the logic is: I download (client), you (server) send, use sz.
 
    Well, finally summed up in one sentence:
    I (client) upload, you (server) receive (RZ), I download (client), you (server) send (SZ).
 
-------------------------------------------------- -------------------------------------------------- -------------------------
 
sz usage:
download one file
sz filename

download multiple files
sz filename1 filename2

download all files in the dir directory, excluding the folders under
dir sz dir/* The
storage location of the downloaded files is set in securtCRT, located in:
English version options — session options — X/Y/Zmodem.
Chinese Version Options - Session Options - X/Y/Zmodem.
 
rz usage:
After entering rz and press Enter, a file selection dialog box will appear, select the file to be uploaded, multiple files can be specified at a time, and the path to upload to the server is the directory where the rz command is currently executed.
 
-------------------------------------------------- -------------------------------------------------- -------------------------
 
Operation example:
 
first perform the upload operation, we use the rz command, the following appears:
 
a dialog box appears to select the file you want to upload , click OK, here we recommend that you choose a certain directory to upload to, which is convenient for management, and all uploaded files are in this directory for management. The following is what I do, the actual situation is set by yourself
 

 
Newly created I created a download folder, cd download/ into the folder, I uploaded all the files to root/download and uploaded them in the current directory.
At this point, enter rz to upload, select the file you want to upload
 

 
Click OK, the upload should start at this time, you will see the progress bar is walking
 

 
, if the upload interface does not appear, you can click and
 


 
click "Zmodem upload list", so the upload is complete, we use the view command ll to take a look at
 

 
this file. Just upload it, other files can be uploaded to linux in this way so that we can install the software.
 
 
Let's take a look at the download operation again, use the sz command:
 

 
use the command sz to upload, and then specify the file to be downloaded. The progress bar
 

 
starts to appear,
 

 
but where do I download it?
 

 
Click the option:
 

 
select the last x/y/Zmodem setting
 

 
Upload directory: When using the rz command to perform an upload operation, the pop-up dialog box will be located in this directory by default.
Download directory: Use the sz command to download the downloaded files by default to this directory.
 
See! The files we downloaded are in the E:\share\download folder, where you can set and define the default directory for downloading and uploading. The


difference between SecureCRT and SshClient is that SecureCRT does not have a graphical file transfer tool, but it does not affect , If you use the command to achieve, it will actually be much more convenient and quicker.
  The first way: To
  upload a file, just enter the command "rz" in the shell terminal emulator, you can select the file on the local disk from the pop-up dialog box, and use Zmodem to upload it to the current path of the server.
  To download a file, simply enter the command "sz filename" in the shell terminal emulator, and then use Zmodem to download the file to a local directory.
  Through "File Transfer", you can modify the default path downloaded to the local. Set the default directory: options-->session options-->file transfer.
  The second way: use sftp
  securecrt and press ALT+P to open a new session for ftp operation.
  Enter: help command to display all the commands provided by the FTP
  pwd: query the directory where the linux host is located (that is, the remote host directory)
  lpwd: query the local directory (generally refers to the directory where windows upload files: we can check the "options" drop-down box by checking "Session Options", we know that the local upload directory is: D:/My Documents)
  ls: Query which files are in the directory where the current linux host is connected
  lls: Query which files are in the current local upload directory
  lcd: Change the local upload directory Path
  cd: Change the remote upload directory
  get: Download the file in the remote directory to the local directory
  put: Upload the file in the local directory to the remote host (linux)
  quit: Disconnect the FTP connection

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326518496&siteId=291194637