Command:

dir


Mode:

Router#

Syntax:

dir [/all] [filesystem: | file-url]


Syntax Description:

/all

(Optional) Lists deleted files, undeleted files, and files with errors.

filesystem:

(Optional) File system or directory containing the file(s) to list followed by a colon.

file-url

(Optional) Name of the file(s) to display on a specified device. The files can be of any type. You can use wildcards in the filename. A wildcard character (*) matches all patterns. Strings after a wildcard are ignored.


Command Description:

To display a list of files on a file system, use the dir EXEC command.

Use the show (Flash file system) command to display more detail about the files in a particular file system.


Example:

The following is sample output from the dir command:

Router#dir slot0:

Directory of slot0:/

  1  -rw-     4720148   Aug 29 1997 17:49:36  hampton/nitro/c7200-j-mz
  2  -rw-     4767328   Oct 01 1997 18:42:53  c7200-js-mz
  5  -rw-         639   Oct 02 1997 12:09:32 rally
  7  -rw-         639   Oct 02 1997 12:37:13  the_time

20578304 bytes total (3104544 bytes free)

Router#dir /all slot0:

Directory of slot0:/

  1  -rw-     4720148   Aug 29 1997 17:49:36  hampton/nitro/c7200-j-mz
  2  -rw-     4767328   Oct 01 1997 18:42:53  c7200-js-mz
  3  -rw-     7982828   Oct 01 1997 18:48:14  [rsp-jsv-mz]
  4  -rw-         639   Oct 02 1997 12:09:17  [the_time]
  5  -rw-         639   Oct 02 1997 12:09:32  rally
  6  -rw-         639   Oct 02 1997 12:37:01  [the_time]
  7  -rw-         639   Oct 02 1997 12:37:13  the_time
 

The following table describes the fields shown in these displays.

Table: dir Field Descriptions

Field Description

1

Index number of the file.

-rw-

Permissions. The file can be any or all of the following:

  •  

  • d�directory
  • r�readable
  • w�writable
  • x�executable

     

4720148

Size of the file.

Aug 29 1997 17:49:36

Last modification date.

hampton/nitro/c7200-j-mz

Filename. Deleted files are indicated by square brackets around the filename.


Misconceptions:
None

Related Commands:
cd
delete
erase
copy

� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)