dir/ls (SFTP client view)
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. |
Usage Guidelines
- 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.
<AC6605> system-view [AC6605] 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