Have the CLI Complete Commands
You do not always have to remember or type the full command or option name for the CLI to recognize it. To display all possible command or option completions, type the partial command followed immediately by a question mark.
To complete a command or option that you have partially typed, press Tab or the Space
Bar. If the partially typed letters begin a string that uniquely identifies a command, the complete command name appears. Otherwise, a beep indicates that you have entered an ambiguous command, and the screen displays the possible completions.Command completion also applies to others strings, such as filenames and usernames. To display all possible values, you can type a partial string followed immediately by a question mark. However, to complete these strings, press Tab; pressing the Space Bar does not work.
Examples: Use CLI Command Completion
Issue the
show interfacecommand:user@host>sh<Space>owi<Space>`i' is ambiguous.Possible completions:igmp Show information about IGMPinterface Show interface informationisis Show information about IS-ISuser@host> show in<Space>terfaces<Enter>Physical interface: at-0/1/0, Enabled, Physical link is UpInterface index: 11, SNMP ifIndex: 65Link-level type: ATM-PVC, MTU: 4482, Clocking: Internal, SONET modeSpeed: OC12, Loopback: None, Payload scrambler: EnabledDevice flags : Present RunningLink flags : 0x01...user@host>Display a list of all log files whose name starts with the string "messages," and then display the contents of one of the files:
user@myhost>show log mes?Possible completions:<filename> Log file to displaymessages Size: 1417052, Last changed: Mar 3 00:33messages.0.gz Size: 145575, Last changed: Mar 3 00:00messages.1.gz Size: 134253, Last changed: Mar 2 23:00messages.10.gz Size: 137022, Last changed: Mar 2 14:00messages.2.gr Size: 137112, Last changed: Mar 2 22:00messages.3.gz Size: 121633, Last changed: Mar 2 21:00messages.4.gz Size: 135715, Last changed: Mar 2 20:00messages.5.gz Size: 137504, Last changed: Mar 2 19:00messages.6.gz Size: 134591, Last changed: Mar 2 18:00messages.7.gz Size: 132670, Last changed: Mar 2 17:00messages.8.gz Size: 136596, Last changed: Mar 2 16:00messages.9.gz Size: 136210, Last changed: Mar 2 15:00user@myhost> show log mes<Tab>sages.4<Tab>.gz<Enter>Jan 15 21:00:00 myhost newsyslog[1381]: logfile turned over...