The dir command displays the list of directories and files in the specified directory of the remote machine.
By default, the details about the current directory are displayed.
Parameter | Description | Value |
---|---|---|
remote-directory |
Specifies the remote directory name. |
The value is a string of 1 to 255 case-sensitive characters without a blank space. |
local-filename |
Specifies the saved local file name. |
The value is a string of 1 to 255 case-sensitive characters without a blank space. |
Usage Scenario
You can use this command to display the contents of the remote directory. To save the result in the local file, you need to specify the file name.
Precautions
The Cfcard has internal partitions. The remaining space information shown in the dir cfcard: command output greatly differs from that shown in the dir cfcard:/logfile/ command output. Before you install the target system software, run the dir cfcard: command to verify whether the remaining space is sufficient.
<HUAWEI> system-view [~HUAWEI] sftp 1.1.1.1 Trying 1.1.1.1 ... Press CTRL + K to abort Connected to 1.1.1.1. 220 VRPV8 SFTP service ready. User(1.1.1.1:(none)):sftp 331 Password required for sftp. Enter password: sftp-client> dir
<HUAWEI> system-view [~HUAWEI] sftp 1.1.1.1 Trying 1.1.1.1 ... Press CTRL + K to abort Connected to 1.1.1.1. 220 VRPV8 SFTP service ready. User(1.1.1.1:(none)):sftp 331 Password required for sftp. Enter password: sftp-client> dir new_folder
<HUAWEI> system-view [~HUAWEI] sftp 1.1.1.1 Trying 1.1.1.1 ... Press CTRL + K to abort Connected to 1.1.1.1. 220 VRPV8 SFTP service ready. User(1.1.1.1:(none)):sftp 331 Password required for sftp. Enter password: sftp-client> dir new_folder output.txt