Tuesday, December 23, 2008

The Magical Forward Slash

I was on a Cisco TAC support case a couple of years ago where the support engineer created a WebEx session to gain control of a Cisco router to assist with troubleshooting an issue I had.

As he was looking through various parts of the configuration, he entered a 'show run' command and hit the forward slash key (/) with interesting results.

The engineer didn't want to give me any information about this apparently hidden command. So, I did some investigative testing.

As it turns out, the forward slash key works as a parser, teleporting you to the part of the configuration defined by the text entered after the forward slash.

For example, suppose you would like to see the configuration of the console port and VTY interfaces. You could type 'show run | b line con 0', or you could use the following example.

Enter 'show run' on a router or switch. Once the first page of the configuration is displayed, hit the forward slash key. The 'show run' command is paused and you are prompted with a new line preceeded by a forward slash. Type 'line con 0' and hit enter. The 'show run' command jumps to the line con 0 section and begins showing the configuration starting at that point.

This is an extremely useful feature that I find myself using all the time.

No comments: