Displaying File Contents; Saving Command Output To A File; Compressing And Uncompressing Files - Cisco N5010P-N2K-BE Software Configuration Manual

Nx-os software configuration guide
Table of Contents

Advertisement

Chapter 3
Configuring the Switch
S e n d f e e d b a c k t o n x 5 0 0 0 - d o c f e e d b a c k @ c i s c o . c o m
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.
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 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
Usage for volatile://
19443712 bytes free
20971520 bytes total
switch# gzip volatile:Samplefile
switch# dir
Usage for volatile://
20705280 bytes free
20971520 bytes total
The gunzip command uncompresses (unzips) LZ77 coded files.
This example unzips the file that was compressed in the previous example:
switch# gunzip Samplefile
switch# dir
Usage for volatile://
19443712 bytes free
20971520 bytes total
OL-16597-01
1525859
Jul 04 00:51:03 2003 Samplefile
1527808 bytes used
266069
Jul 04 00:51:03 2003 Samplefile.gz
266240 bytes used
1525859
Jul 04 00:51:03 2003 Samplefile
1527808 bytes used
Cisco Nexus 5000 Series Switch CLI Software Configuration Guide
Using Switch File Systems
3-25

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nexus 5000 series

Table of Contents