dir

Use this command to list files stored in the file system, on a particular slot, or on a USB device plugged into one of the USB ports.

Syntax

dir [slotN | slotN/usbN] [images] [filename]

Parameters

slotN | slotN/usbN (Optional) Specifies the slot or USB subdirectory for which you want to list files.

See the Usage information below for supported slot numbers and USB numbers for your chassis.

images (Optional) Specifies that information for all images on the system will display.
filename (Optional) Specifies the file, in the root directory or a subdirectory (slot or USB device directory), to list.

Defaults

If none of the optional parameters are specified, all files in the system will be displayed.

Mode

All command modes.

Usage

If you specify a specific slot with the dir command (for example, dir slot2 on an S-Series and slot11 on a K-Series), the output will list all files on the slot and any USB devices on the slot.

If you specify a specific USB device with the dir command (for example, dir slot2/usb2 on an S-Series device, slot11/usb1 on a K-Series device or slot1/usb1 on a 710-Series device), the output will list only the files on the USB device on the slot.

The K- Series supports a single USB port specified as usb1. The USB port is located on slot7 for the K6 chassis and on slot11 for the K10 chassis.

The S-Series supports 2 USB ports. usb1 is the console port. usb2 is a port on a supported slot. USB ports are supported on the following slots, by chassis:

  • SSA – slot 1
  • S3 chassis – slots 1, 2, and 3
  • S4 chassis – slots 3 and 4
  • S6 chassis – slots 3, 4, and 5
  • S8 chassis – slots 3, 4, and 5

More output detail is available for images on the system when specifying a particular image to view or using the images option to display detail for all images on the system.

If C2 security mode is enabled, the Secure directory, including all secure logs, can not be accessed while in Read-Write or Read-Only user modes.

Examples

This example shows how to list all the files in the S-Series system:

System(su)->dir
Images:
==============================================================================
Filename:      S-76101-0002
Version:       07.61.01.0002
Size:          10845980 (bytes)
Date:          THU DEC 08 18:28:18 2011
Filename:      S-76101-0003 (Active) (Boot)
Version:       07.61.01.0003T
Size:          10846108 (bytes)
Date:          TUE DEC 13 18:27:22 2011
Files:
==============================================================================
slot2:
AUG 22 2011  15:08:22           37332 ipstrc.log.gz
DEC 08 2011  14:50:54 <DIR>     16384 cores
NOV 04 2011  11:02:42            9759 031611
AUG 19 2011  08:28:08 <DIR>     16384 logs
DEC 02 2011  13:19:56           13090 120211
DEC 06 2011  11:06:56           14866 120611
DEC 13 2011  18:28:34           16577 121311
slot3:
OCT 20 2011  17:28:28 <DIR>     16384 cores
AUG 11 2011  14:27:00 <DIR>     16384 logs
JUL 08 2011  09:31:56 <DIR>     16384 secure
NOV 16 2011  15:47:10           10318 111611
slot4:
AUG 22 2011  15:08:38 <DIR>     16384 cores
JUN 29 2011  18:49:22 <DIR>     16384 logs
JUL 08 2011  09:31:58 <DIR>     16384 secure

This example shows how to list all the files in the K-Series system:

System(su)->dir
Images:
==============================================================================
Filename:      K-76101-0002T
Version:       07.61.01.0002T
Size:          10840238 (bytes)
Date:          THU DEC 08 18:30:28 2011
Filename:      K-76101-0003T (Active) (Boot)
Version:       07.61.01.0003T
Size:          10841246 (bytes)
Date:          TUE DEC 13 18:26:48 2011
Files:
==============================================================================
slot7:
DEC 06 2011  12:18:52 <DIR>     16384 cores
JAN 28 2003  16:14:48           14156 031611
FEB 02 2003  18:05:24           14215 032111
FEB 05 2003  17:41:36           14656 032411
JUN 24 2011  11:18:40           89717 ipstrc.log.gz
MAY 10 2011  12:38:22           15900 051011
MAY 12 2011  11:01:12           22659 051211
JUL 08 2011  09:32:30 <DIR>     16384 secure

This example shows how to list all the files in the 7100-Series system:

System(su)->dir
Images:
==============================================================================
Filename:      image3
Version:       07.90.02.0016T
Size:          8834908 (bytes)
Date:          FRI FEB 14 12:39:02 2003
Filename:      0790020016T_Duplicate (Active) (Boot) (Unofficial)
Version:       07.90.02.0016T.msiedzik504E2528
Size:          8834509 (bytes)
Date:          MON FEB 17 15:42:20 2003Files:
==============================================================================
slot1:
JUL 25 2012  09:08:32            7509 cnfmib.cfg
JUL 31 2012  09:57:38 <DIR>      4096 cores
APR 29 2003  06:14:58 <DIR>      4096 logs
APR 29 2003  05:49:18 <DIR>      4096 secure

This S-Series example shows how to list information about a specific file:

S Chassis(su)->dir  S-76101-0002
Filename:      S-76101-0002
Version:       07.61.01.0002
Size:          10845980 (bytes)
Date:          THU DEC 08 18:28:18 2011
CheckSum:      8101e4f14a13cc4d3a691fb8a5fac161
HAU Key:       a40dc8ca42102b7db12aeeae5f5d91a964a588a0 (HAU compatible)
Location:      slot2, slot3, slot4
Compatibility: Sx0000-0000, ST4106-0248, ST1206-0848, SG4101-0248, SG1201-0848,
               SK1008-0816, ST4106-0348-F6, ST1206-0848-F6, ST5206-0848-F6,
               SG1201-0848-F6, SG5201-0848-F6, SK1208-0808-F6, SK5208-0808-F6,
               SSA-T4068-0252, SSA-T1068-0652, SSA-T5068-0652, SSA-G1018-0652,
               SSA-G5018-0652

This 7100-Series example shows how to list information for all system images:

System(su)->dir images
Images:
==============================================================================
Filename:      image2 (Active) (Boot)
Version:       07.90.02.0015T
Size:          8855292 (bytes)
Date:          TUE AUG 28 14:23:06 2012
CheckSum:      794c71fe1f0e075dfb5129cbada613c7
HAU Key:       e3ce0998e1db83c5bed8f3776f7bb0435eac7b21 (active image)
Location:      slot1
*Active:       slot1
Compatibility: 71K11L4-24, 71K11L4-48, 71K91L4-24, 71K91L4-48

dir Output Details provides an explanation of the command output.

Click to expand in new window

dir Output Details

Output... What it displays...
Images Lists all the images resident in the chassis and information about each.
Filename Name of the image file stored in the local file system. Flags may be listed after the filename:
  • (Active) — Indicates this image is currently running.
  • (Boot) — Indicates this image is selected to boot on the next reset.
Version Firmware version of the image.
Size Size of image file in the local file system.
Date Date of image file in the local file system.
CheckSum MD5 checksum calculated across the entire image file, used for image identity and verification.
HAU Key The High Availability key used to determine HAU compatibility between images. If the image is HAU compatible with the active image, The phrase “(HAU compatible)” is appended to the key information (S-, 7100-Series).
Location Modules on which this image resides. The system automatically mirrors all images to all other compatible modules in the system. A user cannot selectively add or remove images from individual modules while they reside in the same chassis.
Compatibility Module types on which this image is qualified to run. Attempting to run an incompatible image on a given module will not succeed.
Files User maintained files, such as CLI configuration files. For details on working with configuration files, refer to show config (show config) and configure (configure.)
slotN Lists user maintained files on a slot. If a USB device is connected to the USB port associated with the slot, the files on the USB device are also listed.
slotN/usbN Lists user maintained files on a USB device connected to the USB port associated with a slot.