get

Function

The get command copies a remote file from FTP server to local device.

Format

get remote-filename [ local-filename ]

Parameters

Parameter Description Value
remote-filename

Specifies the remote file which is to be copied to local file.

The value is a string of 1 to 128 case-sensitive characters, spaces not supported.

local-filename

Specifies the local-file name.

Remote-filename is a string data type. The string length range is from 1 to 128 characters.

Views

FTP client view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
ftp-client execute

Usage Guidelines

If the local file name is not specified, the downloaded file is saved using the same name as that of the remote file in the FTP server.

Example

# In binary mode, copy a remote file to a local directory to overwrite an existing file.
<HUAWEI> ftp 10.1.1.1
[ftp] get vrp.cc vrp.cc213 8884664
Warning: The file dd.cc already exists. Overwrite it? [Y/N]:y
200 Port command okay. 
150 Opening BINARY mode data connection for /vrp.cc. 
| 100% [***********]  
226 Transfer complete.  

FTP: 8884664 byte(s) received in 10.356 second(s) 651.171Kbyte(s)/sec.
# In ASCII mode, copy a remote file to a local directory and change the local file name to R.txt.
<HUAWEI> ftp 10.1.1.1
[ftp] get wrong.log R.txt
Warning: The file may not transfer correctly in ASCII mode.
213 5554664 
200 Port command okay. 
150 Opening ASCII mode data connection for /wrong.log. 
| 100% [***********]  
226 Transfer complete.  

FTP: 5554664 byte(s) received in 8.356 second(s) 649.171Kbyte(s)/sec.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >