| Parameter | Description | Value |
|---|---|---|
remote-filename |
Specifies the file name on the remote FTP server. |
The value is a string of 1 to 64 characters. |
local-filename |
Specifies the local file name. |
The value is a string of 1 to 64 characters. |
If the local file name is not specified, the downloaded file is saved using the original name from the file on the remote FTP server.
The get command supports resumable download. When you use the get command to re-download an incompletely downloaded file, the system automatically compares the local file size with the file size on the FTP server. If the local file size is smaller than the file size on the FTP server, the system asks you to determine whether to resume the download or overwrite the existing file.
If the local file name is the same as the remote file name on the FTP server but the two files are of different contents, the system still asks you to determine whether to resume the download or overwrite the existing file, so long as the local file is smaller than the remote file. In this situation, choose to overwrite the existing file or use the local-filename command to rename the file to be downloaded.
The file system has a restriction on the number of files in the root directory. Therefore, if more than 50 files exist in the root directory, creating new files in this directory may fail.
# Download temp1.c and save it with the name as temp.c.
<sysname> ftp 172.16.1.1
Trying 172.16.1.1... Press CTRL+K to abort Connected to 172.16.1.1. 220 FTP service ready. User(172.16.1.1:(none)):ftpuser 331 Password required for ftpuser Enter password: 230 User logged in. [ftp] get temp1.c temp.c 200 Port command okay. 150 Opening ASCII mode data connection for temp1.c. 226 Transfer complete. FTP: 4 byte(s) received in 8.190 second(s) .48byte(s)/sec.