< Home

dir/ls (SFTP client view)

Function

The dir / ls command specifies the file list in the directory of the SFTP server.

Format

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

Parameters

Parameter Description Value

-l

Specifies the file list in the current directory.

-

-a

Specifies all the file names in the current directory.

-

remote-directory

Specifies the directory on the SFTP server.

The value is a string. The absolute path of the directory ranges from 1 to 64 characters. If remote-directory is not specified, the file list in the current directory is displayed by default.

Views

SFTP client view

Default Level

2: Configuration level

Usage Guidelines

The system indicates an error if the dir / ls [ remote-directory ] command fails.

Example

# Display the file list in directory directory 1 on the server.

<sysname> system-view
[sysname] sftp 10.1.1.1 
Please input the username: client001
Trying 10.1.1.1 ...
Press CTRL+K to abort
Enter password:   
sftp-client> dir directory1
-rwxrwxrwx   1 noone    nogroup      8069 May 28 20:30 8070.cfg
-rwxrwxrwx   1 noone    nogroup    121692 Mar 20 11:31 matnLog.dat
-rwxrwxrwx   1 noone    nogroup     14743 May 14 11:59 paf.txt
-rwxrwxrwx   1 noone    nogroup      6935 May 14 11:59 license.txt
-rwxrwxrwx   1 noone    nogroup     14743 May 14 11:59 paf.txt.bak
-rwxrwxrwx   1 noone    nogroup       396 May 30 07:17 hostkey
-rwxrwxrwx   1 noone    nogroup       540 May 30 07:17 serverkey    
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >