Guest

Cisco IOS Software Releases 12.2 T

Show Command Output Redirection

Table Of Contents

Show Command Output Redirection

Contents

Prerequisites for Show Command Output Redirection

Information About Show Command Output Redirection

show and more Command Output Keywords for Writing to a File

How to Configure Show Command Output Redirection

Configuration Examples for Show Command Output Redirection

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Command Reference

more <url> append

show <command> append

show <command> redirect

show <command> tee

Feature Information for Show Command Output Redirection


Show Command Output Redirection


First Published: January 28, 2002
Last Updated: March 27, 2006

The Show Command Output Redirection feature adds the capability to redirect output from Cisco IOS command-line interface (CLI) show commands and more commands to a file. This allows you to save the output of these commands to local or remote storage for event analysis and troubleshooting.

Finding Feature Information in This Module

Your Cisco IOS software release may not support all of the features documented in this module. To reach links to specific feature documentation in this module and to see a list of the releases in which each feature is supported, use the "Feature Information for Show Command Output Redirection" section.

Finding Support Information for Platforms and Cisco IOS Software Images

Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.

Contents

Prerequisites for Show Command Output Redirection

Information About Show Command Output Redirection

How to Configure Show Command Output Redirection

Configuration Examples for Show Command Output Redirection

Additional References

Command Reference

Feature Information for Show Command Output Redirection

Prerequisites for Show Command Output Redirection

You must have permission to write to the destination URL.

Information About Show Command Output Redirection

This section contains the following information about the Show Command Output Redirection feature:

show and more Command Output Keywords for Writing to a File

show and more Command Output Keywords for Writing to a File

This feature enhances the show commands in the Cisco IOS CLI to allow large amounts of data output to be written directly to a file for later reference. This file can be saved on local or remote storage devices such as flash memory, a SanDisk, or an external memory device.

For each show command issued, a new file can be created, or the output can be appended to an existing file. Command output can optionally be displayed on-screen while being redirected to a file by using the tee keyword. Redirection is available using a pipe (|) character after any show command, combined with the redirect, append, or tee keywords.

These extensions can also be added to more commands.

How to Configure Show Command Output Redirection

There are no tasks for Show Command Output Redirection.

For usage guidelines, see the command pages in the "Command Reference" section.

Configuration Examples for Show Command Output Redirection

There are no configuration examples for Show Command Output Redirection.

Additional References

The following sections provide references related to the Show Command Output Redirection feature.

Related Documents

Related Topic
Document Title

Information about specific more commands

Cisco IOS Configuration Fundamentals Command Reference, Release 12.4

Information about specific show commands

Cisco IOS Release 12.4 command references


Standards

Standard
Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.


MIBs

MIB
MIBs Link

No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs


RFCs

RFC
Title

No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.


Technical Assistance

Description
Link

The Cisco Technical Support & Documentation website contains thousands of pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.

http://www.cisco.com/techsupport


Command Reference

This section documents modified commands only.

more <url> append

show <command> append

show <command> redirect

show <command> tee

more <url> append

To redirect and add the output of any more command to an existing file, use the more url | append command in privileged EXEC mode.

more url | append destination-url

Syntax Description

more url

The Cisco IOS File System (IFS) URL specifying the location of the file to be displayed.

The Cisco IFS uses URLs to specify the location of a file system, directory, and file. Typical URL elements include:

prefix:[directory/]filename

| append destination-url

The addition of this syntax redirects the command output to the file location specified in the destination-URL. The pipe (|) is required. You should specify at least a prefix and a name of a previously created file.

For the destination URL, prefixes can be local file locations, such as flash: or disk0:. Alternatively, you can specify network locations using the following syntax:

ftp:[[//[username[:password]@]location]/directory]/filename

tftp:[[//location]/directory]/filename

Note The rcp: prefix is not supported.


Command Modes

Privileged EXEC

Command History

Release
Modification

12.0(21)S

This command was introduced.

12.2(13)T

This command was integrated into Cisco IOS Release 12.2(13)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.


Usage Guidelines

This command adds the more command output to the end of the specified file. Unlike most applications of the more command, the output is not paused at a -More- prompt when the | append extension is used. Therefore, use of this command is essentially equivalent to using the show url | append command.

To display all destination URL prefixes that are supported for this command, use the more url | append ? command.

Examples

In the following example, more system:running-config command output is appended to an existing file called "mar-runconfig" in slot 0:

Router> enable
Password: 
Router# show slot0:

-#- ED ----type---- --crc--- -seek-- nlen -length- -----date/time------ name
1 .. image     D052F5B4  E8488C  22 14960652 Mar 09 2003 00:58:18 c7200-p-mz.122-14.6.T2
2 .. unknown   D35321D3  E8509C   4     1934 Mar 23 2003 20:25:07 mar-runconfig

9680756 bytes available (14960780 bytes used)

Router# more system:?

system:its  system:memory  system:running-config  system:vfiles

Router# more system:running-config | redirect slot0:mar-runconfig

Router# more slot0:mar-runconfig
!
! Last configuration change at 15:35:57 PST Sat Mar 22 2003
!
version 12.2
no service pad
service timestamps debug uptime
service timestamps log datetime localtime show-timezone year
no service password-encryption
service sequence-numbers
!
hostname Router
!
logging queue-limit 100
.
.
.

Related Commands

Command
Description

more <url> | redirect

Redirects the output of any more command to a specified file.

show <command> | redirect

Redirects the output of any show command to a specified file.

show <command> | tee

Copies the show command output to a file while displaying it on the terminal.


show <command> append

To redirect and add the output of any show command to an existing file, use the show append command in privileged EXEC mode.

show command | append url

Syntax Description

command

Any Cisco IOS show command.

| append url

The addition of this syntax redirects the command output to the file location specified in the URL. The pipe (|) is required.

The Cisco IOS File System (IFS) uses URLs to specify the location of a file system, directory, and file. Typical URL elements include:

prefix:[directory/]filename

Prefixes can be local file locations, such as flash: or disk0:. Alternatively, you can specify network locations using the following syntax:

ftp:[[//[username[:password]@]location]/directory]/filename

tftp:[[//location]/directory]/filename

Note The rcp: prefix is not supported.


Command Modes

Privileged EXEC

Command History

Release
Modification

12.0(21)S

This command was introduced.

12.2(13)T

This command was integrated into Cisco IOS Release 12.2(13)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.


Usage Guidelines

To display all URL prefixes that are supported for this command, use the show command | append ? command.

This command adds the show command output to the end of the specified file.

Related Commands

Command
Description

show <command> redirect

Redirects the output of any show command to a specified file.

show <command> tee

Copies the show command output to a file while displaying it on the terminal.


show <command> redirect

To redirect the output of any show command to a file, use the show redirect command in privileged EXEC mode.

show command | redirect url

Syntax Description

command

Any Cisco IOS show command.

| redirect url

The addition of this syntax redirects the command output to the file location specified in the URL. The pipe (|) is required.

The Cisco IOS File System (IFS) uses URLs to specify the location of a file system, directory, and file. Typical URL elements include:

prefix:[directory/]filename

Prefixes can be local file locations, such as flash: or disk0:. Alternatively, you can specify network locations using the following syntax:

ftp:[[//[username[:password]@]location]/directory]/filename

tftp:[[//location]/directory]/filename

Note The rcp: prefix is not supported.


Command Modes

Privileged EXEC

Command History

Release
Modification

12.0(21)S

This command was introduced.

12.2(13)T

This command was integrated into Cisco IOS Release 12.2(13)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.


Usage Guidelines

To display all URL prefixes that are supported for this command, use the show command | redirect ? command.

This command creates a new file at the specified location or overwrites an existing file.

Related Commands

Command
Description

show <command> append

Redirects and appends show command output to the end of an existing file.

show <command> tee

Copies the show command output to a file while displaying it on the terminal.


show <command> tee

To copy the output of any show command to a file while displaying it on the terminal, use the show tee command in privileged EXEC mode.

show command | tee [/append] url

Syntax Description

command

Any Cisco IOS show command.

| tee url

The addition of this syntax copies the command output to the file location specified in the URL. The pipe (|) is required.

The Cisco IOS File System (IFS) uses URLs to specify the location of a file system, directory, and file. Typical URL elements include:

prefix:[directory/]filename

Prefixes can be local file locations, such as flash: or disk0:. Alternatively, you can specify network locations using the following syntax:

ftp:[[//[username[:password]@]location]/directory]/filename

tftp:[[//location]/directory]/filename

Note The rcp: prefix is not supported.

/append

(Optional) Adds the show command output to an existing file.


Command Modes

Privileged EXEC

Command History

Release
Modification

12.0(21)S

This command was introduced.

12.2(13)T

This command was integrated into Cisco IOS Release 12.2(13)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.


Usage Guidelines

To display all URL prefixes that are supported for this command, use the show command | tee ? command.

The tee keyword was chosen to reflect that output is redirected to two locations: the terminal and a file (as a tee plumbing junction redirects water to two different pipes).

Related Commands

Command
Description

show <command> redirect

Redirects the output of any show command to a specified file.

show <command> append

Redirects the output of any show command and adds it to the end of existing file.


Feature Information for Show Command Output Redirection

Table 1 lists the release history for this feature.

Not all commands may be available in your Cisco IOS software release. For release information about a specific command, see the command reference documentation.

Cisco IOS software images are specific to a Cisco IOS software release, a feature set, and a platform. Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.


Note Table 1 lists only the Cisco IOS software release that introduced support for a given feature in a given Cisco IOS software release. Unless noted otherwise, subsequent maintenance releases of that Cisco IOS software release also support that feature.


Table 1 Feature Information for Show Command Output Redirection 

Feature Name
Releases
Feature Information

Show Command Output Redirection

12.0(21)S,
12.2(13)T,
12.2(28)SB

The Show Command Output Redirection feature adds the capability to redirect output from Cisco IOS command-line interface (CLI) show commands and more commands to a file. This allows you to save the output of these commands to local or remote storage for event analysis and troubleshooting.

In 12.0(21)S, this feature was introduced.

In 12.2(13)T, this feature was integrated into a Cisco IOS 12.2T release.

In 12.2(28)SB, this feature was integrated into a Cisco IOS 12.2SB release.

The following sections provide information about this feature:

show and more Command Output Keywords for Writing to a File

The following commands were modified by this feature: more <url> append, show <command> append, show <command> redirect, show command> tee.