Saving Command Output To A File; Directing Show Command Output To A File; Compressing And Uncompressing Files - Cisco MDS 9124 - Fabric Switch Reference

Cisco mds 9000 family command reference - cisco mds san-os release 3.0(1) through 3.3(1a) (ol-16217-01, april 2008)
Hide thumbs Also See for Cisco MDS 9124 - Fabric Switch:
Table of Contents

Advertisement

Using the File System
S e n d d o c u m e n t a t i o n c o m m e n t s t o m d s f e e d b a c k - d o c @ c i s c o . c o m
end
show int
This example displays the contents of a file residing in the current directory.
switch# show file myfile

Saving Command Output to a File

You can force all screen output to go to a file by appending > filename to any command. For example,
enter show interface > samplefile at the EXEC mode switch prompt to save the interface configuration
to samplefile—a file created at the same directory level. At the EXEC mode switch prompt, issue a dir
command to view all files in this directory, including the recently saved samplefile.
Refer to the Cisco MDS 9000 Family CLI Configuration Guide for further information.
Redirection is allowed only if the current directory is on the
Note
Redirection is not allowed if the current directory is on the
can be viewed using the pwd command and changed using the cd command.

Directing show Command Output to a File

You can direct show command output to a file, either on the volatile file system, on slot0 CompactFlash
memory, or on a remote server.
The following example shows how to direct the show running-config output to a file on the volatile file
system.
switch1# show running-config > volatile:switch1-run.cfg
The following example shows how to direct the show running-config output to a file on slot0
CompactFlash memory.
switch2# show running-config > slot0:switch2-run.cfg
The following example shows how to direct the show running-config output to a file on a TFTP server.
switch3# show running-config > tftp://10.10.1.1/home/suser/switch3-run.cfg
Preparing to copy...done

Compressing and Uncompressing Files

The gzip command compresses (zips) the specified file using LZ77 coding.
This example directs the output of the show tech-support command to a file (Samplefile) and then zips
the file and displays the difference in the space used up in the volatile: directory:
switch# show tech-support > Samplefile
Building Configuration ...
switch# dir
Usage for volatile://
Cisco MDS 9000 Family Command Reference
1-36
1525859
Jul 04 00:51:03 2003 Samplefile
1527808 bytes used
19443712 bytes free
Chapter 1
(default) or
volatile:
slot0:
file system. The current directory
bootflash:
OL-16217-01, Cisco MDS SAN-OS Release 3.x
CLI Overview
file systems.

Advertisement

Table of Contents
loading

Table of Contents