JAEN

Cisco IOS

dir flash:

SafeFlash and boot image

dir flash:

Lists flash contents and (with show boot) the boot pointer — pre-upgrade space checks, post-upgrade sanity.

Examples

  • dir flash: | include binList IOS images
  • show version | include imageThe image the switch booted from
  • verify /md5 flash:c2960x-universalk9-mz.152-7.E10.binCheck the image hash against the published value
  • boot system flash:c2960x-universalk9-mz.152-7.E10.binSet the image for the next boot (config mode)
  • delete flash:old-image.binDelete an old image to free space

Syntax

dir flash: / show boot / delete flash:<file>

Key points

  • The last line (bytes total, bytes free) shows free space. If it is smaller than the new image, delete an old one.
  • Some platforms use bootflash: instead of flash: (ISR, ASR and others).
  • Compare verify /md5 with Cisco's published hash before changing boot system.

When it does not work

  • A wrong boot system entry can leave the switch in ROMMON after a reload. Check show boot and save the config before reloading.

Before you run it

dir is read-only; delete needs care.

Related commands

You can carry a laptop to the rack. Signal will not follow.

Check syntax standing in front of the hardware, with no connection at all. The app keeps 1,510 commands and 120 fix flows on your device. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store