"show bootflash" and "dir bootflash" are same?

Why we get different output between "show bootflash" and "dir bootflash" in ask1006? The two command looks to function differently. I thought they were the same. Thank you
Who is Participating?
Garry GlendownConnect With a Mentor Consulting and Network/Security SpecialistCommented:
They are more or less the same, except that the show-command lists all files recursively (including subdirectory contents), while the dir-command only shows the directory content you want to see, so:

core-gw#dir bootflash:
Directory of bootflash:/

   11  drwx       16384  Nov 23 2011 03:42:41 +01:00  lost+found
308257  drwx        4096  Dec 15 2011 03:26:39 +01:00  core
97345  drwx        4096  Jul 13 2014 12:03:32 +02:00  .prst_sync
811201  drwx        4096  Dec 15 2011 03:27:02 +01:00  .rollback_timer
   12  -rw-           0  Dec 15 2011 03:27:17 +01:00  tracelogs.567
502945  drwx        8192   Sep 1 2016 10:22:55 +02:00  tracelogs

The contents of all the directories isn't shown, you have to supply the appropriate name/path in order to get the content, much like it is for any regular OS.

core-gw#dir bootflash:/tracelogs
Directory of bootflash:/tracelogs/

502949  -rwx        1030   Sep 1 2016 09:42:40 +02:00  inst_cleanup_R0-0.log.8292.20160901094240
502948  -rwx        1031   Sep 1 2016 10:07:49 +02:00  inst_cleanup_R0-0.log.29251.20160901100749

Whereas the show command does not allow you to just show a subdirectory, but will always only use a device path (flash, nvram, bootflash etc.) and just dump everything in there ... also, show will not display things like the nvram. Just understand the "show" command as a higher-level command, while the "dir" command is more low-level access.
eemoonAuthor Commented:
Yes, Thank you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.