SAN-OS / NX-OS “which” command (Part 1)

SAN-OS / NX-OS contains a command that will list all commands on the system. This command is which. You can build a full list of all system commands quickly by disabling the CLI pager (term length 0), and then typing which.

This can be very helpful when combined with regular expressions. For example to see all commands that contain the word “zoneset”:

MDS1# which | inc zoneset
[ 2302]. show ips internal info islb zoneset
[ 3400]. show zone analysis zoneset[o][o] vsan
[ 3474]. show zoneset
[ 3475]. show zoneset name[o][o]
[ 3476]. show zoneset name[o][o] pending[o]
[ 3477]. show zoneset name[o][o] pending[o] brief[o]
[ 3478]. show zoneset name[o][o] pending[o] brief[o] active[o]
[ 3479]. show zoneset name[o][o] pending[o] brief[o] active[o] vsan[o][o]
[ 3619]. zone copy active-zoneset full-zoneset include-auto-zones[o] vsan
[ 3620]. zone copy active-zoneset full-zoneset vsan
[ 3621]. zone copy vsan active-zoneset full-zoneset
[ 3622]. zone copy vsan active-zoneset full-zoneset include-auto-zones[o]
[ 3623]. zone copy vsan active-zoneset
[ 3624]. zoneset distribute vsan
[ 3625]. zoneset export vsan
[ 3626]. zoneset import interface vsan

which is not a documented command. If you know of any other undocumented commands please let us know what you find!

This entry was posted in CCIE Storage, CLI, MDS and tagged , , , . Bookmark the permalink.

Leave a Reply