The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This section includes the following topics:
•Removing an Existing Directory
•Deleting Files or Directories
•Directing Command Output to a File
•Verifying a Configuration File before Loading
•Rolling Back to a Previous Configuration
•Feature History for File Management
The Cisco Nexus 1000V file system provides a single interface to all the file systems the switch uses, including:
•Flash memory file systems
•Network file systems (TFTP and FTP)
•Any other endpoint for reading or writing data (such as NVRAM or the running configuration)
This section describes how to navigate the file system and includes the following topics:
•Identifying the Directory You are Working From
•Listing the Files in a File System
•Identifying Available File Systems for Copying Files
The syntax for specifying a file system is <file system name>:[//server/]. Table 6-1 describes file system syntax.
Use this procedure to display the directory name of your current CLI location.
Before using this command, you must know or do the following:
•You are logged in to the CLI.
|
|
|
---|---|---|
Step 1 |
pwd Example:
n1000v# pwd bootflash: |
Displays the present working directory. |
Use this procedure to change your location in the CLI, from one directory or file system to another.
Before using this command, you must know or do the following:
•You are logged in to the CLI in any command mode.
•Cisco Nexus 1000V CLI defaults to the bootflash: file system.
Tip Any file saved in the volatile: file system is erased when the switch reboots.
Use this procedure to display the contents of a directory or file.
|
|
|
---|---|---|
Step 1 |
dir [directory | filename]
|
Displays the contents of a directory or file. |
Example:
DCOS-112-R5# dir lost+found/
49241 Jul 01 09:30:00 2008 diagclient_log.2613
12861 Jul 01 09:29:34 2008 diagmgr_log.2580
31 Jul 01 09:28:47 2008 dmesg
1811 Jul 01 09:28:58 2008 example_test.2633
89 Jul 01 09:28:58 2008 libdiag.2633
42136 Jul 01 16:34:34 2008 messages
65 Jul 01 09:29:00 2008 otm.log
741 Jul 01 09:29:07 2008 sal.log
87 Jul 01 09:28:50 2008 startupdebug
Usage for log://sup-local
51408896 bytes used
158306304 bytes free
209715200 bytes total
DCOS-112-R5#
Use this procedure to identify the file systems you can copy to or from.
Before using this procedure, you must know or do the following:
•You are logged in to the CLI in EXEC mode.
Use this procedure to have the CLI complete a partial file name in a command.
Use this procedure to copy a file, such as a configuration file, to save it or reuse it at another location. If your internal file systems are corrupted, you could potentially lose your configuration. Save and back up your configuration files periodically. Also, before installing or migrating to a new software configuration, back up the existing configuration files.
Before beginning this procedure, you must know or do the following:
•You are logged in to the CLI through a Telnet, or SSH connection.
•If copying to a remote location, make sure that your device has a route to the destination. Your device and the remote destination must be in the same subnetwork if you do not have a router or default gateway to route traffic between subnets.
•Using the ping command, make sure that your device has connectivity to the destination.
•Make sure that the source configuration file is in the correct directory on the remote server.
•Make sure that the permissions on the source file are set correctly. Permissions on the file should be set to world-read.
Note Use the dir command to ensure that enough space is available in the destination file system. If enough space is not available, use the delete command to remove unneeded files.
|
|
|
---|---|---|
bootflash |
sup-active |
User-specified |
volatile |
— |
User-specified |
nvram |
— |
startup-config or snapshot-config |
system |
— |
running-config |
tftp1 |
IPv4 address, IPv6 address, or DNS name |
User-specified |
ftp |
||
scp (secure copy) |
||
sftp |
||
core |
slot-number |
Process identifier number |
1 When downloading and uploading files, a limitation of TFTP restricts file size to 32 MB on the TFTP client and 16 MB on some TFTP servers . |
Use this procedure to create a directory at the current directory level or at a specified directory level.
Use this section to remove an existing directory from the Flash file system.
Before using this command, you must know or do the following:
•You are logged in to the CLI.
•This command is only valid on Flash file systems.
•Before you can remove it, the directory must be empty.
Use this procedure to move a file from one location to another location.
Before using this command, you must know or do the following:
•You are logged in to the CLI.
•The copy will not complete if there is not enough space in the destination directory.
Use this procedure to delete files or directories on a Flash Memory device.
•When you delete a file, the software erases the file.
•If you attempt to delete the configuration file or image specified by the CONFIG_FILE or BOOTLDR environment variable, the system prompts you to confirm the deletion.
•If you attempt to delete the last valid system image specified in the BOOT environment variable, the system prompts you to confirm the deletion.
Use this procedure to compress (zip) a specified file using LZ77 coding.
•You are logged in to the CLI.
Example:
n1000v# show system internal l2fm event-history errors >errorsfile
n1000v# dir
2687 Jul 01 18:17:20 2008 errorsfile
16384 Jun 30 05:17:51 2008 lost+found/
4096 Jun 30 05:18:29 2008 routing-sw/
49 Jul 01 17:09:18 2008 sample_test.txt
1322843 Jun 30 05:17:56 2008 nexus-1000v-dplug-mzg.4.0.4.SV1.0.42.bin
21629952 Jun 30 05:18:02 2008 nexus-1000v-kickstart-mzg.4.0.4.SV1.0.42.bin
39289400 Jun 30 05:18:14 2008 nexus-1000v-mzg.4.0.4.SV1.0.42.bin
Usage for bootflash://
258408448 bytes used
2939531264 bytes free
3197939712 bytes total
n1000v# gzip bootflash:errorsfile
n1000v# dir
1681 Jun 30 05:21:08 2008 cisco_svs_certificate.pem
703 Jul 01 18:17:20 2008 errorsfile.gz
16384 Jun 30 05:17:51 2008 lost+found/
4096 Jun 30 05:18:29 2008 routing-sw/
49 Jul 01 17:09:18 2008 sample_test.txt
1322843 Jun 30 05:17:56 2008 nexus-1000v-dplug-mzg.4.0.4.SV1.0.42.bin
21629952 Jun 30 05:18:02 2008 nexus-1000v-kickstart-mzg.4.0.4.SV1.0.42.bin
39289400 Jun 30 05:18:14 2008 nexus-1000v-mzg.4.0.0.S1.0.34.bin
Usage for bootflash://
258408448 bytes used
2939531264 bytes free
3197939712 bytes total
n1000v#
Use this procedure to uncompress (unzip) a specified file that is compressed using LZ77 coding.
•You are logged in to the CLI.
|
|
|
---|---|---|
Step 1 |
gunzip [path] filename |
Uncompresses the specified file. |
Step 2 |
dir |
Displays the contents of a directory, including the newly uncompressed file. |
Example:
n1000v# gunzip bootflash:errorsfile.gz
n1000v# dir bootflash:
2687 Jul 01 18:17:20 2008 errorsfile
16384 Jun 30 05:17:51 2008 lost+found/
4096 Jun 30 05:18:29 2008 routing-sw/
49 Jul 01 17:09:18 2008 sample_test.txt
1322843 Jun 30 05:17:56 2008 nexus-1000v-dplug-mzg.4.0.0.SV1.0.42.bin
21629952 Jun 30 05:18:02 2008 nexus-1000v-kickstart-mzg.4.0.4.SV1.0.42.bin
39289400 Jun 30 05:18:14 2008 nexus-1000v-mzg.4.0.0.SV1.0424.bin
Usage for bootflash://sup-local
258408448 bytes used
2939531264 bytes free
3197939712 bytes total
DCOS-112-R5#
Use this procedure to direct command output to a file.
Use this procedure to verify the integrity of an image before loading it. This command can be used for both the system and kickstart images.
Use this procedure to recover your configuration from a previously saved version.
Note Each time a copy running-config startup-config command is used, a binary file is created and the ASCII file is updated. A valid binary configuration file reduces the overall boot time significantly. A binary file cannot be uploaded, but its contents can be used to overwrite the existing startup configuration. The write erase command clears the binary file.
This section describes how to display information about files and includes the following procedures:
•Displaying Directory Contents
•Displaying the Last Lines in a File
Use this procedure to display the contents of a specified file.
•You are logged in to the CLI.
Use this procedure to display the contents of a directory or file system.
Before using this command, you must know or do the following:
•You are logged in to the CLI.
|
|
|
---|---|---|
Step 1 |
pwd Example:
n1000v# pwd bootflash: |
Displays the present working directory. |
Step 2 |
dir |
Displays the contents of the directory. |
Example:
n1000v# pwd
bootflash:
n1000v# dir
Usage for volatile://
0 bytes used
20971520 bytes free
20971520 bytes total
n1000v#
Use this procedure to display checksums for checking file integrity.
Use this command to display the last lines (tail end) of a specified file.
•You are logged in to the CLI in EXEC mode.
|
|
|
---|---|---|
Step 1 |
tail {path}[filename] {Number of lines} |
Displays the requested number of lines from the end of the specified file. Allowable range for number of lines: 0 - 80 |
Example:
n1000v# tail bootflash:errorsfile 5
20) Event:E_DEBUG, length:34, at 171590 usecs after Tue Jul 1 09:29:05 2008
[102] main(326): stateless restart
n1000v#
This section provides the file management feature release history.
|
|
|
---|---|---|
File Management |
4.0(4)SV1(1) |
This feature was introduced. |