No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Fit AP V200R010C00 Command Reference

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
dir/ls (SFTP client view)

dir/ls (SFTP client view)

Function

dir and ls commands display a list of specified files that are stored on the SFTP server.

Format

dir [ -l | -a ] [ remote-directory ]

ls [ -l | -a ] [ remote-directory ]

Parameters

Parameter Description Value
-l Displays detailed information about all files and directories in a specified directory. -
-a Displays names of all files and directories in a specified directory. -
remote-directory Specifies the name of a directory on the SFTP server. 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

The dir and ls commands are equivalent.
  • If -l and -a parameters are not specified, detailed information about all files and directories in a specified directory is displayed after you run the dir or ls command. The effect is the same as the dir -l command output.
  • By default, if the remote-directory parameter is not specified, the list of current directory files is displayed after you run the dir or ls command.

Example

# Displays a list of files in the test directory of 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
Enter password:
sftp-client> dir test
drwxrwxrwx   1 noone    nogroup         0 Mar 24 18:48 .
drwxrwxrwx   1 noone    nogroup         0 Mar 29 14:52 ..
-rwxrwxrwx   1 noone    nogroup         0 Mar 24 00:04 yourtest
-rwxrwxrwx   1 noone    nogroup      5736 Mar 24 18:38 backup.txt
-rwxrwxrwx   1 noone    nogroup      5736 Mar 24 18:38 backup1.txt
sftp-client> dir -a test
.
..
yourtest
backup.txt
backup1.txt
sftp-client> ls test
drwxrwxrwx   1 noone    nogroup         0 Mar 24 18:48 .
drwxrwxrwx   1 noone    nogroup         0 Mar 29 14:52 ..
-rwxrwxrwx   1 noone    nogroup         0 Mar 24 00:04 yourtest
-rwxrwxrwx   1 noone    nogroup      5736 Mar 24 18:38 backup.txt
-rwxrwxrwx   1 noone    nogroup      5736 Mar 24 18:38 backup1.txt
sftp-client> ls -a test
.
..
yourtest
backup.txt
backup1.txt
Translation
Download
Updated: 2019-07-18

Document ID: EDOC1100064353

Views: 152916

Downloads: 125

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next