5-100
Cisco IOS XR Getting Started Guide for the Cisco XR 12000 Series Router
OL-24755-01
Chapter 5 CLI Tips, Techniques, and Shortcuts
Displaying System Information with show Commands
RP/0/0/CPU0:router# terminal length 20
For information on searching or filtering CLI output, see the “Filtering show Command Output” section
on page 5-102.
Halting the Display of Screen Output
To interrupt screen output and terminate a display, press Ctrl-C, as shown in the following example:
RP/0/0/CPU0:router# show running-config
<Ctrl-C>
Redirecting Output to a File
By default, CLI command output appears on the screen. CLI command output can be redirected to a
user-specified file by entering a filename and location after the show command syntax. The following
command syntax is used to redirect output to a file:
show command | file filename
This feature enables you to save any of the show command output in a file for further analysis and
reference. When you choose to redirect command output, consider the following guidelines:
• If the full path of the file is not specified, the default directory for your account is used. You should
always save your target configuration files to this location.
• If the saved output is to be used as a configuration file, the filename should end with the cfg suffix
for easy identification. This suffix is not required, but can help locate target configuration files.
Example:
myconfig.cfg
In the following example, a target configuration file is saved to the default user directory:
RP/0/0/CPU0:router# configure
RP/0/0/CPU0:router(config)# show configure | file disk0:myconfig.cfg
RP/0/0/CPU0:router(config)# abort
RP/0/0/CPU0:router#
Narrowing Output from Large Configurations
Displaying a large running configuration can produce thousands of lines of output. To limit the output
of a show command to only the items you want to view, use the procedures in the following sections:
• Limiting show Command Output to a Specific Feature or Interface, page 5-100
• Using Wildcards to Display All Instances of an Interface, page 5-101
Limiting show Command Output to a Specific Feature or Interface
Entering keywords and arguments in the show command limits the show output to a specific feature or
interface.
In the following example, only information about the static IP route configuration appears:
RP/0/0/CPU0:router# show running-config router static