Using the Device File Systems, Directories, and Files
• To display the contents of the current directory, run the following command:
Displaying the Last Lines in a File
The default number of lines is 10. The range is from 0 to 80 lines.
Note
To display the last lines in a file, run the following command:
tail [filesystem:[//module/]][directory/]filename [lines]
Example:
switch# tail ospf-gr.conf
Redirecting show Command Output to a File
You can redirect the show command output to a file on bootflash:, slot0:, volatile:, or on a remote server.
To redirect the output from a show command to a file, run the following command:
show command > [filesystem:[//module/][directory] | [directory /]]filename
Example:
switch# show tech-support > bootflash:techinfo
Finding Files
You can find files that have names begining with a specific character string in the current working directory
and its subdirectories.
To find all the files beginning with the filename prefix in the default directory and in its subdirectories, run
the following command:
find filename-prefix
Example:
switch# find bgp_script
OL-29291-02
Example:
switch# gunzip show_tech.gz
The file that has be uncompressed must have the .gz suffix. After the file is
Note
uncompressed, it does not have the .gz suffix.
dir [filesystem :[//module/][directory]]
Example:
switch# dir bootflash:
Cisco MDS 9000 Family NX-OS Fundamentals Configuration Guide
Displaying the Last Lines in a File
107