Cisco Nexus 5000 Series Switch CLI Software Configuration Guide, NX-OS 4.0(1a)N1 (OL-16597-01, January 2009)

Send feedback to nx5000-docfeedback@cisco.com
3-25
Cisco Nexus 5000 Series Switch CLI Software Configuration Guide
OL-16597-01
Chapter 3 Configuring the Switch
Using Switch File Systems
This example shows how to delete a file from the current working directory:
switch# delete dns_config.cfg
This example deletes the entire bootflash: directory and all its contents:
switch# delete bootflash:my-dir
Caution If you specify a directory, the delete command deletes the entire directory and all its contents.
Displaying File Contents
The show file command displays the contents of a specified file in the file system.
This example displays the contents of a file residing in the current directory:
switch# show file myfile
Displaying File Checksums
The show file command can display checksums which allow you to check the file integrity. It displays
the checksum or MD5 checksum of the specified file.
This example displays the MD5 checksum of a file:
switch# show file bootflash:trunks2.cfg md5sum
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 which is a file created at the same directory level. At the EXEC mode switch prompt, enter
a dir command to view all files in this directory, including the recently saved Samplefile.
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
1525859 Jul 04 00:51:03 2003 Samplefile
Usage for volatile://
1527808 bytes used
19443712 bytes free
20971520 bytes total
switch# gzip volatile:Samplefile
switch# dir
266069 Jul 04 00:51:03 2003 Samplefile.gz