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 (FTP client view)

dir/ls (FTP client view)

Function

The dir and ls commands display all files or specified files that are stored on the FTP server, and save them to a local disk.

Format

dir [ remote-filename [ local-filename ] ]

ls [ remote-filename [ local-filename ] ]

Parameters

Parameter Description Value
remote-filename Specifies the name and directory of a file stored on the FTP server. The value is a string of 1 to 64 case-insensitive characters without spaces.
local-filename Specifies the name of the local file that saves the FTP server file information. The value is a string of 1 to 64 case-insensitive characters without spaces.

Views

FTP client view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The following describes differences between the dir and ls commands.

  • After you run the dir command, detailed file information is displayed, including the file size, date when the file is created, whether the file is a directory, and whether the file is editable. After you run the ls command, only the file name is displayed.
  • The dir command is used to save detailed file information, while the ls command is used to save only the file name even if the file is specified and saved in a local directory.

Precautions

The wildcard (*) can be used in commands dir and ls.

Example

# Display the name or detailed information about a file that are saved in the test directory.

<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in. 
[Huawei-ftp] cd test 
250 CWD command successfully.

[Huawei-ftp] dir
200 Port command okay.
150 File Listing Follows in ASCII mode
drwxrwxrwx   1 noone    nogroup         0 Mar 24 10:48 .
drwxrwxrwx   1 noone    nogroup         0 Mar 26 15:52 ..
drwxrwxrwx   1 noone    nogroup         0 Mar 23 16:04 yourtest
-rwxrwxrwx   1 noone    nogroup      5736 Mar 24 10:38 backup.txt
-rwxrwxrwx   1 noone    nogroup      5736 Mar 24 10:38 backup1.txt 
226 Transfer finished successfully.
[Huawei-ftp] ls
200 Port command okay.
150 File Listing Follows in ASCII mode
yourtest
backup.txt
backup1.txt
226 Transfer finished successfully.
FTP: 10 byte(s) received in 0.110 second(s) 90.90byte(s)/sec.

# Display the detailed information in file temp.c, and save the displayed information in file temp1.

[Huawei-ftp] dir temp.c temp1
200 PORT command okay                                                           
150 File Listing Follows in ASCII mode                                          
\                                                                               
226 Transfer finished successfully.                                             
FTP: 62 byte(s) received in 0.050 second(s) 1.24Kbyte(s)/sec.                   

[Huawei-ftp] quit
221 Windows FTP Server (WFTPD, by Texas Imperial Software) says goodbye         
                                                                                
<Huawei> more temp1
-rwxrwxrwx  1  noone   nogroup  3929  Apr 27 18:13  temp.c

# Display the name of file test.bat, and save the displayed information in file test.

<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in. 
[Huawei-ftp] ls test.bat test
200 Port command okay.
150 Opening ASCII mode data connection for test.bat.

226 Transfer complete.

[Huawei-ftp] quit

221 Server closing.
<Huawei> more test
test.bat
Table 2-19  Description of the dir/Is command output

Parameter

Description

d in the command output

Indicates a directory. If there is no output for this parameter, the command output indicates a file.

r in the command output

Indicates that the file or directory can be read.

w in the command output

Indicates that the file or directory is editable.

Translation
Download
Updated: 2019-07-18

Document ID: EDOC1100064353

Views: 134318

Downloads: 108

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