< Home

get (SFTP client view)

Function

The get command downloads a file from the SFTP server and saves the file to the local device.

Format

get remote-filename [ local-filename ]

Parameters

Parameter Description Value
remote-filename Specifies the name of the file to be downloaded from the SFTP server. The value is a string of 1 to 64 case-insensitive characters without spaces.
local-filename Specifies the name of a downloaded file to be saved to the local device. The value is a string of 1 to 64 case-insensitive characters without spaces.

Views

SFTP client view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

You can run the get command to download files from the FTP server to upgrade devices.

Precautions

  • If local-filename is not specified on the local device, the original file name is used.

  • If the name of the downloaded file is the same as that of an existing local file, the system prompts you whether to overwrite the existing file.

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.

Example

# Download a file from the SFTP server.

<HUAWEI> system-view
[HUAWEI] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201 ...
Enter password:
sftp-client> get test.txt
Remote file: / test.txt --->  Local file: test.txt
Info: Downloading file successfully ended.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >