[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Using CLI Command Completion

You do not always have to remember or type the full command or option name for the CLI to recognize it.

Command completion also applies to other strings, such as filenames, interface names, and usernames. To display all possible values, type a partial string followed immediately by a question mark. However, to complete these strings, press Tab; pressing the Spacebar does not work.

Examples: Using CLI Command Completion

Issue the show interfaces command:


user@host> sh<Space>ow i<Space>
'i' is ambiguous.
Possible completions:
igmp                   Show information about IGMP
interface              Show interface information
isis                   Show information about IS-IS

user@host> show in<Space>terfaces
Physical interface: at-0/1/0, Enabled, Physical link is Up
Interface index: 11, SNMP ifIndex: 65
Link-level type: ATM-PVC, MTU: 4482, Clocking: Internal, SONET mode
Speed: OC12, Loopback: None, Payload scrambler: Enabled
Device flags: Present Running
Link flags: 0x01
...

user@host>

Display a list of all log files whose names start with the string “messages,” and then display the contents of one of the files:


user@myhost> show log mes?
Possible completions:
  Log file to display
messagesSize: 1417052, Last changed: Mar 3 00:33
messages.0.gzSize:  145575, Last changed: Mar 3 00:00
messages.1.gzSize:  134253, Last changed: Mar 2 23:00
messages.10.gzSize: 137022, Last changed: Mar 2 14:00
messages.2.grSize:  137112, Last changed: Mar 2 22:00
messages.3.gzSize:  121633, Last changed: Mar 2 21:00
messages.4.gzSize:  135715, Last changed: Mar 2 20:00
messages.5.gzSize:  137504, Last changed: Mar 2 19:00
messages.6.gzSize:  134591, Last changed: Mar 2 18:00
messages.7.gzSize:  132670, Last changed: Mar 2 17:00
messages.8.gzSize:  136596, Last changed: Mar 2 16:00
messages.9.gzSize:  136210, Last changed: Mar 2 15:00

user@myhost> show log mes<Tab>sages.4<Tab>.gz<Enter>
Jan 15 21:00:00 myhost newsyslog[1381]: logfile turned over
...

[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]