dir

Function

The dir command displays information about a specified file or a directory of a storage device on the device.

By default, information about files in the current directory is displayed.

Format

dir

dir /all

dir filename

dir /all filename

dir /all-filesystems

dir /all /all-filesystems

Parameters

Parameter Description Value
/all

Displays all files, including the dumped files in the recycle bin.

-

filename

Specifies the name of a file or a directory.

The value is a character string in the format of [ <drive> ][ <path> ][ <file-name> ]. An absolute <path> name is a string of 1 to 255 characters. A relative <path> name is a string of 1 to 128 characters. Up to 8 levels of directories are supported.

An absolute <path> is in the format of <drive> [ <path> ][ <file-name> ], and a relative <path> is in the format of [ <path> ][ <file-name> ]. That is, a relative <path> is the root <path> of the current working <path>.

/all-filesystems

Displays information about all files in the root directory of storage medium.

-

Views

User view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
rpm read

Usage Guidelines

Usage Scenario

You can run the dir /all command to view information about all files including dumped files in the recycle bin. The name of a dumped file is placed in brackets "[ ]", for example, [text].

For details about the file information displayed in the dir command output, see Configuration > Basic Configuration > File System Configuration > Operating Files After Logging In to a Device > Managing Directories.

The wildcard "*" can be used in the command.

If hidden files exist in the system, they occupy disk space.

Example

# Display file information in cfcard:/.
<HUAWEI> dir
Directory of cfcard:/                                                           
                                                                                
  Idx  Attr     Size(Byte)  Date        Time       FileName                     
    0  drwx              -  Jul 13 2013 21:47:58   $_checkpoint                 
    1  -rw-      1,173,968  May 28 2013 06:31:03   123.PAT     
    2  -rw-    164,169,606  Jul 08 2013 20:48:21   123.cc   
    3  -rw-          6,632  Jul 13 2013 20:19:02   a.cfg                        
    4  -rw-          4,444  Jul 13 2013 20:43:58   device.sys
Table 1 Description of the dir command output
Item Description
Directory of cfcard

Directory on the CF card.

Idx

File index.

Attr

File attribute.

Size(Byte)

File size.

Date

Date when a file was generated.

Time

Time when a file was generated.

FileName

File name.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >