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

A while back I wrote a blog post on the SAN-OS / NX-OS “which” command. I have really found this very useful for finding commands quickly. I discovered another interesting variation of this command. Not only does it work in EXEC mode but it also works in Config mode:

MDS1(config)# which

[ 1]. aaa accounting default group<STRING>

[ 2]. aaa accounting default group<STRING> none[o]

[ 3]. aaa accounting default group<STRING> <STRING>

[ 4]. aaa accounting default group<STRING> <STRING> none[o]

[ 5]. aaa accounting default group<STRING> <STRING> <STRING>

[ 6]. aaa accounting default group<STRING> <STRING> <STRING> none[o]

[ 7]. aaa accounting default group<STRING> <STRING> <STRING> <STRING>

[ 8]. aaa accounting default group<STRING> <STRING> <STRING> <STRING> none[o]

[ 9]. aaa accounting default group<STRING> <STRING> <STRING> <STRING> <STRING>

[ 10]. aaa accounting default group<STRING> <STRING> <STRING> <STRING> <STRING> none[o]

[ 11]. aaa accounting default group<STRING> <STRING> <STRING> <STRING> <STRING> <STRING>

[ 12]. aaa accounting default group<STRING> <STRING> <STRING> <STRING> <STRING> <STRING> none[o]

[ 13]. aaa accounting default group<STRING> <STRING> <STRING> <STRING> <STRING> <STRING> <STRING>

[ 14]. aaa accounting default group<STRING> <STRING> <STRING> <STRING> <STRING> <STRING> <STRING> none[o]

[ 15]. aaa accounting default group<STRING> <STRING> <STRING> <STRING> <STRING> <STRING> <STRING> <STRING>

[ 16]. aaa accounting default group<STRING> <STRING> <STRING> <STRING> <STRING> <STRING> <STRING> <STRING> none[o]

[ 17]. aaa accounting default local[o]

[ 18]. aaa accounting default local[o] none[o]

[ 19]. aaa accounting default none[o]
.
.

Basically it shows all the possible permutations of each command. This is alot. As in millions of lines. Nonetheless, its quite useful, for example, I was trying to remember how to set the multicast root election mode to FC-SW3 standard method, and couldn’t remember the command:

MDS1# which | inc multicast
[ 1810]. show fcroute multicast
[ 1811]. show fcroute multicast vsan
[ 1812]. show fcroute multicast [o] vsan
[ 2709]. show system internal fcfwd sfib multicast vsan
[ 2877]. show system internal rib multicast
[ 2878]. show system internal rib multicast pss
[ 2879]. show system internal rib multicast pss [o]
[ 2880]. show system internal rib multicast pss [o] vsan[o][o]
[ 2881]. show system internal rib multicast [o]
[ 2882]. show system internal rib multicast [o] vsan[o][o]
[ 2887]. show system internal rib sync-log multicast
[ 2888]. show system internal rib sync-log multicast pss[o]
[ 2916]. show system internal rib verification-report multicast module
MDS1# which | inc mroute
MDS1# which | inc mroot
MDS1# which | inc root
MDS1(config)# which | inc mroot
MDS1(config)# which | inc mcast
[ 115]. cfs ipv4 mcast-address
[ 117]. cfs ipv6 mcast-address
[3420916]. logging level mcast
[3420980]. mcast root lowest vsan
[3420981]. mcast root principal vsan

Thank god for pipes, the command was all the way down past 3,000,000! Hope you find this command useful in your studies!

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

Leave a Reply