Using Switch File Systems
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
switch# delete dns_config.cfg
This example shows how to delete a file from an external CompactFlash (slot0):
switch# delete slot0:dns_config.cfg
This example deletes the entire my-dir directory and all its contents:
switch# delete bootflash:my-dir
If you specify a directory, the delete command deletes the entire directory and all its contents.
Caution
Displaying File Contents
The show file command displays the contents of a specified file in the file system.
The syntax for this command is show file filename.
This example displays the contents of the test file that resides in the slot0 directory:
switch# show file slot0:test
config t
Int fc1/1
no shut
end
show int fc1/1
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 a samplefile 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. See
"Initial Configuration,"
"Software Images,"
As of MDS NX-OS Release 4.1(1a), redirection is allowed regardless of the current directory.
Note
In the earlier releases, redirection is allowed only if the current directory is on the volatile: (default) or
slot0: file systems, and redirection is not allowed if the current directory is on the bootflash: file system.
The current directory can be viewed using the pwd command and changed using the cd command.
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
Cisco MDS 9000 Family CLI Configuration Guide
2-32
for information on saving and copying configuration files, and
for information on saving and copying software images.
Chapter 2
Before You Begin
Chapter 5,
Chapter 8,
OL-18084-01, Cisco MDS NX-OS Release 4.x