Common CLI Commands
The table below describes common CLI commands.
Common CLI Commands
Command |
Description |
|||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <filter> |
Filters a command's output by matching the filter string or expression, and thereby displaying only what you need. The syntax includes the command, the vertical bar (|) and the filter expression: <command>|<filter string or expression> The filter expression can be:
# show running-config|include sbc routing ip2ip-routing 1
For example: show system version|grep Number
# show running-config|begin troubleshoot
# show running-config|between "sbc malicious-signature-database 0" exit
|
|||||||||||||||||||||||||||
| tail <number of lines> |
Filters the command output to display a specified number of lines from the end of the output. The syntax includes the command of whose output you want to filter, the vertical bar (|) followed by the tail command, and then the number of lines to display: <command> | tail <number of lines (1-1000) to display> Below shows an example where the last five lines of the show running-config command output are displayed: # show running-config | tail 5 |
|||||||||||||||||||||||||||
activate |
Applies (activates) the command setting. Note:
|
|||||||||||||||||||||||||||
defaults |
Restores the configuration of the currently accessed command set to factory default settings. For example, the below restores the Automatic Update configuration to factory defaults: (auto-update)# defaults |
|||||||||||||||||||||||||||
descending |
Displays the command output in descending order, for example: # show voip calls active descending Note: Currently, this filter is supported only by certain show commands. |
|||||||||||||||||||||||||||
display |
Displays the configuration of current configuration set. |
|||||||||||||||||||||||||||
do |
Runs a command from another unrelated command without exiting the current command set. For example, the command to display all active alarms is run from the current command set for clock settings: (clock)# do show active-alarms The example below runs the show running-config command (which displays device configuration) from the current command set for clock settings: (clock)# do show running-config |
|||||||||||||||||||||||||||
exit |
Leaves the current command-set and returns one level up. For online parameters, if the configuration was changed and no activate command was entered, the exit command applies the activate command automatically. If entered on the top level, the session ends. (config-system)# exit |
|||||||||||||||||||||||||||
first <x> |
Filters the command output to display the first x number of entries. For example, the following displays only the first two entries: # show voip calls history sbc first 2 Note: Currently, this filter is supported only by certain show commands. |
|||||||||||||||||||||||||||
help |
Displays a short help how-to string. |
|||||||||||||||||||||||||||
history |
Displays a list of previously run commands in the current CLI session in the command history buffer. You can also clear the command history buffer, using the clear history command. |
|||||||||||||||||||||||||||
last <x> |
Filters the command output to display the last x number of entries. For example, the following displays only the last four entries: # show voip calls active last 4 Note: Currently, this filter is supported only by certain show commands. |
|||||||||||||||||||||||||||
list |
Displays a list of the available commands list of the current command-set. |
|||||||||||||||||||||||||||
no |
Undoes an issued command, disables a feature or deletes a table row. Enter the no before the command, for example:
# no debug log
<config-voip># no sbc routing ip2ip-routing 2 |
|||||||||||||||||||||||||||
pwd |
Displays the full path to the current CLI command, for example: (auto-update)# pwd |
|||||||||||||||||||||||||||
quit |
Terminates the CLI session. |
|||||||||||||||||||||||||||
range <x-y> |
Filters the command output to display a range of entries from x to y. For example, the following displays only the entries from 1 to 4: # show voip calls active range 1-4 Note: Currently, this filter is supported only by certain show commands. |
|||||||||||||||||||||||||||
where |
Searches a table for a row index that contains a specific value for a specific table column. Use the following format: <Table> where <Column Name> <Value> The following example searches the table for a row index whose table column 'name' contains the value "ITSP": (config-voip)# ip-group where name ITSP |