|
|
The Cisco IOS File System (IFS) feature provides a single interface to all file systems the router uses:
IFS provides the following benefits:
With IFS, all files can be viewed and classified (image, text file, and so forth), including files on remote servers. For example, you may want to determine the size and type of an image on a remote server before you copy it to ensure that it is a valid image. You can also view a configuration file on a remote server to verify that it is the correct configuration file before you load the file on the router.
With IFS, the file system user interface is no longer platform specific. Commands have the same syntax, regardless of which platform is used. Thus, you can use the same commands for all of your routers.
However, not all commands are supported on all platforms and file systems. Because different types of file systems support different operations, certain commands are not available for all file systems. Platforms will support commands for the file systems they use.
IFS minimizes the required prompting for many commands, such as the copy command. You can enter all of the required information in the command line, rather than having to provide information when the system prompts you for it. For example, if you want to copy a file to an FTP server, you can specify the specific location on the router of the source file, the specific location of the destination file on the FTP server, and the username and password to use when connecting to the FTP server, all on a single line. However, if you wish to have the router prompt you for the needed information, you can still enter the minimum form of the command.
Depending on the current configuration of the file prompt command and the type of command you entered, the router may prompt you for confirmation, even if you have provided all the information in the command. In these cases, the default value will be the value entered in the command. Press Return to confirm the values.
With IFS, you can move around to different directories and list the files in a directory. On newer platforms, you can create subdirectories in Flash memory or on a disk.
The new file system interface uses Uniform Resource Locators (URLs) to specify the location of a file. URLs are commonly used to specify files or locations on the World Wide Web. However, on Cisco routers, they can now be used to specify the location of files on the router or remote file servers.
On Cisco routers, use URLs in commands to specify the location of the file or directory. For example, if you want to copy a file from one location to another, use the copy source-url destination-url command.
The format of URLs used by the routers can vary from the format you may be used to using. There are also a variety of formats that can be used, based on the location of the file.
When you want to specify a file on a network server, use one of the following forms:
ftp:[[//[username[:password]@]location]/directory]/filenameThe location can be an IP address or a host name. The username variable, if specified, overrides the username specified by the ip rcmd remote-username or ip ftp username commands. The password overrides the password specified by the ip ftp password command.
The file path (directory and filename) is specified relative to the directory used for file transfers. For example, on UNIX file servers, TFTP pathnames start in the /tftpboot directory, and rcp and FTP paths start in the home directory associated with the username.
The following example specifies the file c7200-j-mz.112-current on the TFTP server myserver.cisco.com. The file is located in the directory called master.
tftp://myserver.cisco.com/master/c7200-j-mz.112-current
The following example specifies the file ship-config on the server enterprise.cisco.com. The router uses the username jeanluc and the password secret to access this server via FTP.
ftp://jeanluc:secret@enterprise.cisco.com/ship-config
For local files (files on the router), the syntax is basically the same as the syntax previously used on high-end platforms; however, you can now specify directories:
prefix:[directory/]filenameUse this form to specify a file located on the router. For example, use this form to specify a file in Flash memory or NVRAM.
The following example specifies the startup configuration in NVRAM:
nvram:startup-config
The following example specifies the file backup-config in the configs directory of Flash memory:
flash:configs/backup-config
When referring to a file system instead of a file, the form is
prefix:This form specifies the file system itself, rather than a file in the file system. Use this form to perform commands on file systems themselves, such as listing the files in a file system or formatting the file system.
The following example specifies the first PCMCIA Flash memory card:
slot0:
The URL prefix specifies the file system. File system prefixes are listed in Table 1. The list of available file systems differs by platform and operation. Refer to your product documentation or use the show file systems command to determine which prefixes are available on your platform.
| Prefix | File System |
|---|---|
bootflash: | Boot Flash memory. |
disk0: | Rotating media. |
flash: | Flash memory. This prefix is available on all platforms. For platforms that do not have a device named flash:, the prefix flash: is aliased to slot0:. Therefore, you can use the prefix flash: to refer to the main Flash memory storage area on all platforms. |
flh: | Flash load helper log files. |
ftp: | File Transfer Protocol (FTP) network server. |
null: | Null destination for copies. You can copy a remote file to null to determine its size. |
nvram: | NVRAM. |
rcp: | Remote copy protocol (rcp) network server. |
slavebootflash: | Internal Flash memory on a slave RSP card of a router configured for HSA. |
slavenvram: | NVRAM on a slave RSP card of a router configured for HSA. |
slaveslot0: | First PCMCIA card on a slave RSP card of a router configured for HSA. |
slaveslot1: | Second PCMCIA card on a slave RSP card of a router configured for HSA. |
slot0: | First PCMCIA Flash memory card. |
slot1: | Second PCMCIA Flash memory card. |
system: | Contains the system memory, including the running configuration. |
tftp: | Trivial File Transfer Protocol (TFTP) network server. |
xmodem: | Obtain the file from a network machine using the Xmodem protocol. |
ymodem: | Obtain the file from a network machine using the Ymodem protocol. |
In all commands, the colon is required after the file system name. However, commands that did not require the colon previously will continue to be supported, although they will not be available in the context-sensitive help.
For partitioned devices, the prefix includes the partition number. The syntax for the prefix on a partitioned device is device:partition-number:.
For example, flash:2: refers to the second partition in Flash memory.
Table 2 lists the maximum lengths of the different URL components.
| Component | Length (Number of Characters) |
|---|---|
Prefix | 31 |
Username | 15 |
Password | 15 |
Hostname | 31 |
Directory | 63 |
Filename | 63 |
Depending on which command you are using, different file systems are available. Some file systems can only serve as a source for files, not a destination. For example, you cannot copy to another machine using Xmodem. Other operations, such as format and erase, are only supported by certain file systems on certain platforms.
The following sections provide hints for using URLs in commands:
Use the context sensitive help to determine which file systems can be used for a particular command. In the following example, the context-sensitive help displays which file systems can be used as sources for the copy command. The output will vary based on the platform.
Router# copy ? /erase Erase destination file system. bootflash: Copy from bootflash: file system flash: Copy from flash: file system ftp: Copy from ftp: file system null: Copy from null: file system nvram: Copy from nvram: file system rcp: Copy from rcp: file system system: Copy from system: file system tftp: Copy from tftp: file system
For most commands, if no file system is specified, the file is assumed to be in the default directory, as specified by the cd command.
Router# pwd slot0: Router# dir Directory of slot0:/ 1 -rw- 4720148 Aug 29 1997 17:49:36 hampton/nitro/c7200-j-mz 2 -rw- 4767328 Oct 01 1997 18:42:53 c7200-js-mz 5 -rw- 639 Oct 02 1997 12:09:32 foo 7 -rw- 639 Oct 02 1997 12:37:13 the_time 20578304 bytes total (3104544 bytes free) Router# cd nvram: Router# dir Directory of nvram:/ 1 -rw- 2725 <no date> startup-config 2 ---- 0 <no date> private-config 3 -rw- 2725 <no date> underlying-config 129016 bytes total (126291 bytes free)
You can use tab completion to reduce the number of characters you need to type for a command. Type the first few characters of the filename, and press the Tab key. If the characters are unique to a filename, the router will complete the filename for you. Continue entering the command as normal and press Return to execute the command.
In the following example, the router completes the filename startup-config because it is the only file in the nvram: file system that starts with "s":
Router# show file info nvram:s<tab> Router# show file info nvram:startup-config<Enter>
If you use tab completion without specifying any characters, the router uses the first file in the file system.
Router# show file info nvram:<tab> Router# show file info nvram:private-config<Enter>
For many commands, you can get a listing of the files in a file system on the router by using the context-sensitive help. In the following example, the router lists the files in NVRAM:
Router# show file info nvram:? nvram:private-config nvram:startup-config nvram:underlying-config
This section describes the following basic tasks related to file system management. These tasks involve new or changed functionality related to IFS:
This section describes general tasks you can perform to use the different file systems.
Not all file systems are supported on every platform. To list the file systems available on your platform, complete the following task in EXEC mode:
| Command | Purpose |
|---|---|
show file systems | List the file systems available on your platform. This command also displays information about each file system. |
You can specify the file system or directory that the system uses as the default file system. Setting the default file system allows you to omit an optional filesystem: argument from related commands. For all EXEC commands that have an optional filesystem: argument, the system uses the file system specified by the cd command when you omit the optional filesystem: argument. For example, the dir command contains an optional filesystem: argument and displays a list of files on the file system.
To specify a default file system, complete the following task in EXEC mode:
| Command | Purpose |
|---|---|
cd filesystem: | Set a default Flash memory device. |
The following example sets the default file system to the Flash memory card inserted in slot 0:
cd slot0:
To display the current default file system, as specified by the cd command, complete the following task in EXEC mode:
| Command | Purpose |
|---|---|
Display the current file system. |
The following example shows that the default file system is slot 0:
Router> pwd slot0:
The following example uses the cd command to change the default file system to system and then uses the pwd command to verify that the default file system was changed:
Router> cd system: Router> pwd system:
You can view a list of the contents of a file system before manipulating its contents. For example, before copying a new configuration file to Flash memory, you may want to verify that the file system does not already contain a configuration file with the same name. Similarly, before copying a Flash configuration file to another location, you may want to verify its filename for use in another command.
To show display information about files on a file system, complete one of the following tasks in EXEC mode:
| Command | Purpose |
|---|---|
dir [/all] [filesystem:][filename] | Display a list of files on a file system. |
show filesystem: | Display more information about each of the files on a file system. |
show file information file-url | Display information about a specific file. |
show file descriptors | Display a list of open file descriptors. |
Router# dir slot0: Directory of slot0:/ 1 -rw- 4720148 Aug 29 1997 17:49:36 hampton/nitro/c7200-j-mz 2 -rw- 4767328 Oct 01 1997 18:42:53 c7200-js-mz 5 -rw- 639 Oct 02 1997 12:09:32 foo 7 -rw- 639 Oct 02 1997 12:37:13 the_time 20578304 bytes total (3104544 bytes free) Router# dir /all slot0: Directory of slot0:/ 1 -rw- 4720148 Aug 29 1997 17:49:36 hampton/nitro/c7200-j-mz 2 -rw- 4767328 Oct 01 1997 18:42:53 c7200-js-mz 3 -rw- 7982828 Oct 01 1997 18:48:14 [rsp-jsv-mz] 4 -rw- 639 Oct 02 1997 12:09:17 [the_time] 5 -rw- 639 Oct 02 1997 12:09:32 foo 6 -rw- 639 Oct 02 1997 12:37:01 [the_time] 7 -rw- 639 Oct 02 1997 12:37:13 the_time 20578304 bytes total (3104544 bytes free) Router# show slot0: -#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name 1 .. unknown 317FBA1B 4A0694 24 4720148 Aug 29 1997 17:49:36 hampton/nitz 2 .. unknown 9237F3FF 92C574 11 4767328 Oct 01 1997 18:42:53 c7200-js-mz 3 .D unknown 71AB01F1 10C94E0 10 7982828 Oct 01 1997 18:48:14 rsp-jsv-mz 4 .D unknown 96DACD45 10C97E0 8 639 Oct 02 1997 12:09:17 the_time 5 .. unknown 96DACD45 10C9AE0 3 639 Oct 02 1997 12:09:32 foo 6 .D unknown 96DACD45 10C9DE0 8 639 Oct 02 1997 12:37:01 the_time 7 .. unknown 96DACD45 10CA0E0 8 639 Oct 02 1997 12:37:13 the_time 3104544 bytes available (17473760 bytes used)
To display the contents of any readable file, including a file on a remote file system, complete the following task in EXEC mode:
| Command | Purpose |
|---|---|
more [/ascii | /binary | /ebcdic] file-url | Display a file. |
The following example displays the contents of a configuration file on a TFTP server:
Router# more tftp://serverA/hampton/savedconfig ! ! Saved configuration on server ! version 11.3 service timestamps log datetime localtime service linenumber service udp-small-servers service pt-vty-logging ! ... end
The methods used for erasing, deleting, and recovering files depend on the class of the Flash file system.
Cisco platforms use one of three different Flash memory file system types. Some commands are supported on only one or two file system types. The command reference documentation notes commands that are not supported on all file system types.
Refer to Table 3 to determine which Flash memory file system type your platform uses.
| Type | Platforms |
|---|---|
Class A | Cisco 7000 family, C12000, LS1010 |
Class B | Cisco 1003, Cisco 1004, Cisco 1005, Cisco 2500 series, Cisco 3600 series, Cisco 4000 series, Cisco AS5200 |
Class C | Cisco MC3810, disk0 of SC3640 |
On Class A Flash file systems, you can delete individual files using the delete command and later recover these files with the undelete command. The delete command marks the files as "deleted," but the files still take up space in Flash memory. To permanently delete the files, use the squeeze command. The squeeze command removes all of the files marked "deleted" from the specified Flash memory device. These files can no longer be recovered. To erase all of the files on a Flash device, use the format command.
When you no longer need a file on a Flash memory device, you can delete it. When you delete a file, the router simply marks the file as deleted, but it does not erase the file. This feature allows you to recover a "deleted" file, as discussed in the following section. You may want to recover a "deleted" image or configuration file if the new image or configuration file becomes corrupted.
To delete a file from a specified Flash device, complete the following task from EXEC mode:
| Command | Purpose |
|---|---|
delete [filesystem:]filename | Delete a file from a Flash memory device. |
If you omit the device, the router uses the default device specified by the cd command.
If you attempt to delete the file specified by the CONFIG_FILE or BOOTLDR environment variable, the system prompts you to confirm the deletion. Also, if you attempt to delete the last valid system image specified in the BOOT environment variable, the system prompts you to confirm the deletion.
The following example deletes the file myconfig from a Flash memory card inserted in slot 0:
delete slot0:myconfig
You can undelete a deleted file. For example, you may want to revert to a previous configuration file because the current one is corrupt.
To undelete a deleted file on a Flash memory device, complete the following tasks in EXEC mode:
| Step | Command | Purpose | ||
|---|---|---|---|---|
| dir /all [filesystem:] | Determine the index of the deleted file. | ||
| undelete index [filesystem:] | Undelete a deleted file on a Flash memory device. |
You must undelete a file by its index because you can have multiple deleted files with the same name. For example, the "deleted" list could contain multiple configuration files with the name router-config. You undelete by index to indicate which of the many router-config files from the list to undelete. Use the dir command with the /all option to learn the index number of the file you want to undelete.
You cannot undelete a file if a valid (undeleted) one with the same name exists. Instead, first delete the existing file and then undelete the file you want. For example, if you had an undeleted version of the router-config file and you wanted to use a previous, deleted version instead, you cannot simply undelete the previous version by index. You must first delete the existing router-config file and then undelete the previous router-config file by index. You can undelete a file as long as the file has not been permanently erased with the squeeze command. You can delete and undelete a file up to 15 times.
undelete 1 slot0:
When a Flash memory device is full, you may need to rearrange the files so that the space used by the "deleted" files can be reclaimed. To determine whether a Flash memory device is full, use the dir command.
To permanently delete files on a Flash memory device, complete the following task from privileged EXEC mode:
| Command | Purpose |
|---|---|
squeeze filesystem: | Permanently delete all files marked "deleted" in Flash memory. |
When you issue the squeeze command, the router copies all valid files to the beginning of Flash memory and erases all files marked "deleted." At this point, you cannot recover "deleted" files, and you can now write to the reclaimed Flash memory space.
To recompute and verify the checksum of a file in Flash memory on a Class A Flash file system, use the verify command.
In the following example, the image c7200-js-mz is deleted and undeleted. Note that the deleted file does not appear in the output for the first dir command, but it appears in the output for the dir /all command.
Router# delete slot1: Delete filename []? c7200-js-mz Delete slot1:c7200-js-mz? [confirm] Router# dir slot1: Directory of slot1:/ No such file 20578304 bytes total (15754684 bytes free) Router# dir /all slot1: Directory of slot1:/ 1 -rw- 4823492 Dec 17 1997 13:21:53 [c7200-js-mz] 20578304 bytes total (15754684 bytes free) Router# undelete 1 slot1: Router# dir slot1: Directory of slot1:/ 1 -rw- 4823492 Dec 17 1997 13:21:53 c7200-js-mz 20578304 bytes total (15754684 bytes free)
In the following example, the image is deleted. In order to reclaim the space taken up by the deleted file, the squeeze command is issued.
Router# delete slot1:c7200-js-mz Delete filename [c7200-js-mz]? Delete slot1:c7200-js-mz? [confirm] Router# squeeze slot1: All deleted files will be removed. Continue? [confirm] Squeeze operation may take a while. Continue? [confirm] Erasing squeeze log Squeeze of slot1: complete Router# dir /all slot1: Directory of slot1:/ No such file 20578304 bytes total (20578304 bytes free)
On Class B Flash file systems, you can delete individual files with the delete command. The delete command marks the file as "deleted." The file is still present in Flash memory and takes up space. To recover the file, use the undelete command. To reclaim any space in Flash memory, you must erase the entire Flash file system with the erase command.
When you no longer need a file on a Flash memory device, you can delete it. When you delete a file, the router simply marks the file as deleted, but it does not erase the file. This feature allows you to recover a "deleted" file, as discussed in the following section. You may want to recover a "deleted" image or configuration file if the new image or configuration file becomes corrupted.
To delete a file from a specified Flash device, complete the following task from EXEC mode:
| Command | Purpose |
|---|---|
delete [filesystem:]filename | Delete a file from a Flash memory device. |
If you omit the device, the router uses the default device specified by the cd command.
The following example deletes the file myconfig from a Flash memory card inserted in slot 0:
delete slot0:myconfig
You can undelete a deleted file. For example, you may want to revert to a previous configuration file because the current one is corrupt.
To undelete a deleted file on a Flash memory device, complete the following tasks in EXEC mode:
| Step | Command | Purpose | ||
|---|---|---|---|---|
| dir /all [filesystem:] | Determine the index of the deleted file. | ||
| undelete index [filesystem:] | Undelete a deleted file on a Flash memory device. |
You must undelete a file by its index because you can have multiple deleted files with the same name. For example, the "deleted" list could contain multiple configuration files with the name router-config. You undelete by index to indicate which of the many router-config files from the list to undelete. Use the dir command with the /all option to learn the index number of the file you want to undelete.
You cannot undelete a file if a valid (undeleted) one with the same name exists. Instead, first delete the existing file and then undelete the file you want. For example, if you had an undeleted version of the router-config file and you wanted to use a previous, deleted version instead, you cannot simply undelete the previous version by index. You must first delete the existing router-config file and then undelete the previous router-config file by index. You can undelete a file as long as the file system has not been permanently erased with the erase command. You can delete and undelete a file up to 15 times.
undelete 1 slot0:
In order to reclaim any space taken up by files in Flash memory, you must erase the entire file system using the erase flash: or erase bootflash: commands. These commands reclaim all of the space in flash memory, erasing all files, deleted or not, in the process. Once erased, these files cannot be recovered. Before erasing Flash memory, save any files you wish to keep in another location (an FTP server, for example). Copy the files back to Flash memory after you have erased the device.
To erase a Flash device, complete the following task from EXEC mode:
| Command | Purpose |
|---|---|
Erase the Flash file system. |
The following example erases all files in the second partition in Flash memory:
Router# erase flash:2 System flash directory, partition 2: File Length Name/status 1 1711088 dirt/gate/c1600-i-mz [1711152 bytes used, 15066064 available, 16777216 total] Erase flash device, partition 2? [confirm] Are you sure? [yes/no]: yes Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
To recompute and verify the checksum of a file in Flash memory on a Class B Flash file system, use the verify command.
On Class C Flash memory file systems, you can delete individual files with the delete command. Files cannot be reclaimed once they have been deleted. Instead, the Flash file system space is reclaimed dynamically. To erase all of the files in Flash, use the format command.
When you no longer need a file on a Flash memory device, you can delete it. When you delete a file on a Class C file system, the file is deleted permanently. The router reclaims the space dynamically.
To delete a file from a specified Flash device, complete the following task in EXEC mode:
| Command | Purpose |
|---|---|
delete [filesystem:]filename | Delete a file from a Flash memory device. |
If you omit the device, the router uses the default device specified by the cd command.
If you attempt to delete the file specified by the CONFIG_FILE or BOOTLDR environment variable, the system prompts you to confirm the deletion. Also, if you attempt to delete the last valid system image specified in the BOOT environment variable, the system prompts you to confirm the deletion.
delete slot0:myconfig
To format a Class C Flash file system, complete the following task in EXEC mode:
| Command | Purpose |
|---|---|
format filesystem | Format Flash. |
If you format a Flash device, all of the files are erased and cannot be recovered.
On Class C Flash file systems, you can create a new directory with the mkdir command. To remove a directory from a Flash file system, use the rmdir command.
On Class C Flash file systems, you can rename a file using the rename command.
On Class C Flash file systems, you can check a file system for damage and repair any problems using the fsck command.
On remote file systems (file systems on FTP, rcp, or TFTP servers) you can perform the following tasks:
On most platforms, NVRAM contains the startup configuration. On Class A Flash file system platforms, the CONFIG_FILE environment variable specifies the location of the startup configuration. However, the file URL nvram:startup-config always specifies the startup configuration, regardless of the CONFIG_FILE environment variable.
You can view the startup-config (with the more nvram:startup-config command), replace the startup config with a new configuration file (with the copy source-url nvram:startup-config command), save the startup configuration to another location (with the copy nvram:startup-config destination-url command), and erase the contents of NVRAM (with the erase nvram: command). The erase nvram: command also deletes the startup configuration if another location is specified by the CONFIG_FILE variable.
This example displays the startup configuration:
nnm3640-2# more nvram:startup-config Using 2279 out of 129016 bytes ! ! Last configuration change at 10:57:25 PST Wed Apr 22 1998 ! NVRAM config last updated at 10:57:27 PST Wed Apr 22 1998 ! version 11.3 service timestamps log datetime localtime service linenumber service udp-small-servers service pt-vty-logging ... end
The following example displays the contents of the NVRAM file system on a Class A Flash file system platform. The file named startup-config is the current startup configuration file, in physical NVRAM or in Flash memory. If the file is located in a Flash memory file system, this entry is a symbolic link to the actual file. The file named underlying-config is always the NVRAM version of the configuration.
Router# dir nvram:
Directory of nvram:/
1 -rw- 2703 <no date> startup-config
2 ---- 5 <no date> private-config
3 -rw- 2703 <no date> underlying-config
129016 bytes total (126313 bytes free)
The system file system contains the system memory and the current running configuration. You can view the current configuration (with the more system:running-config command), save the current configuration to some other location (with the copy system:running-config destination-url command), or add configuration commands to the current configuration (with the copy source-url system:running-config command).
The following example changes to the system file system, views the contents of the file system, and displays the running configuration:
nnm3640-2# cd system: nnm3640-2# dir Directory of system:/ 2 dr-x 0 <no date> memory 1 -rw- 0 <no date> running-config No space information available nnm3640-2# more system:running-config ! ! No configuration change since last restart ! version 11.3 service timestamps log datetime localtime service linenumber service udp-small-servers service pt-vty-logging ! ... end
On some platforms, the system file system contains microcode in its ucode directory.
Router# dir system:/ucode
Directory of system:/ucode/
21 -r-- 22900 <no date> aip20-13
18 -r-- 32724 <no date> eip20-3
25 -r-- 123130 <no date> feip20-6
19 -r-- 25610 <no date> fip20-1
22 -r-- 7742 <no date> fsip20-7
23 -r-- 17130 <no date> hip20-1
24 -r-- 36450 <no date> mip22-2
29 -r-- 154752 <no date> posip20-0
28 -r-- 704688 <no date> rsp220-0
20 -r-- 33529 <no date> trip20-1
26 -r-- 939130 <no date> vip22-20
27 -r-- 1107862 <no date> vip222-20
No space information available
Any command that specifies a file or file system has been changed by this feature. This document does not describe all of the changed commands.
This section describes the following modified commands:
To change the default directory or file system, use the cd EXEC command.
cd [filesystem:]
filesystem: | (Optional) URL of the directory or file system followed by a colon. |
The initial default file system is flash:. For platforms that do not have a physical device named flash:, the keyword flash: is aliased to the default Flash device.
If you do not specify a directory on a file system, the default is the root directory on that file system.
EXEC
This command first appeared in Cisco IOS Release 11.0.
For all EXEC commands that have an optional filesystem argument, the system uses the file system specified by the cd command when you omit the optional filesystem argument. For example, the dir command, which displays a list of files on a file system, contain an optional filesystem argument. When you omit this argument, the system lists the files on the file system specified by the cd command.
The following example sets the default file system to the Flash memory card inserted in the slot 0:
Router# pwd bootflash:/ Router# cd slot0: Router# pwd slot0:/
You can use the master indexes or search online to find documentation of related commands.
copy
delete
dir
pwd
show (Flash file system)
undelete
To delete a file on a Flash memory device, use the delete EXEC command.
delete flash-url
flash-url | URL of the file to be deleted. |
EXEC
This command first appeared in Cisco IOS Release 11.0.
When you delete a file, the software simply marks the file as deleted, but it does not erase the file. This feature allows you to later recover a "deleted" file using the undelete command. You can delete and undelete a file up to 15 times. To permanently delete all files marked "deleted" on a Flash memory device, use the squeeze command.
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. Also, if you attempt to delete the last valid system image specified in the BOOT environment variable, the system prompts you to confirm the deletion.
The following example deletes the file named test from the Flash card inserted in slot 0:
Router# delete slot0:test Delete slot0:test? [confirm]
You can use the master indexes or search online to find documentation of related commands.
cd
dir
show bootvar
squeeze
undelete
To display a list of files on a file system, use the dir EXEC command.
dir [/all] [filesystem: | file-url]
/all | (Optional) Lists deleted files, undeleted files, and files with errors. |
filesystem: | (Optional) File system or directory containing the file(s) to list followed by a colon. |
file-url | (Optional) Name of the file(s) to display on a specified device. The files can be of any type. You can use wildcards in the filename. A wildcard character (*) matches all patterns. Strings after a wildcard are ignored. |
The default file system is specified by the cd command. When you omit the /all keyword, the Cisco IOS software displays only undeleted files.
EXEC
This command first appeared in Cisco IOS Release 11.0.
Use the show (Flash file system) command to display more detail about the files in a particular file system.
The following is sample output from the dir command:
Router# dir slot0: Directory of slot0:/ 1 -rw- 4720148 Aug 29 1997 17:49:36 hampton/nitro/c7200-j-mz 2 -rw- 4767328 Oct 01 1997 18:42:53 c7200-js-mz 5 -rw- 639 Oct 02 1997 12:09:32 foo 7 -rw- 639 Oct 02 1997 12:37:13 the_time 20578304 bytes total (3104544 bytes free) Router# dir /all slot0: Directory of slot0:/ 1 -rw- 4720148 Aug 29 1997 17:49:36 hampton/nitro/c7200-j-mz 2 -rw- 4767328 Oct 01 1997 18:42:53 c7200-js-mz 3 -rw- 7982828 Oct 01 1997 18:48:14 [rsp-jsv-mz] 4 -rw- 639 Oct 02 1997 12:09:17 [the_time] 5 -rw- 639 Oct 02 1997 12:09:32 foo 6 -rw- 639 Oct 02 1997 12:37:01 [the_time] 7 -rw- 639 Oct 02 1997 12:37:13 the_time
Table 4 described the fields shown in this output.
| Field | Description |
|---|---|
1 | Index number of the file. |
-rw- | Permissions. The file can be any or all of the following:
|
4720148 | Size of the file. |
Aug 29 1997 17:49:36 | Last modification date. |
hampton/nitro/c7200-j-mz | Filename. Deleted files are indicated by square brackets around the filename. |
You can use the master indexes or search online to find documentation of related commands.
To erase a file system, use the erase EXEC command.The erase nvram: command replaces the write erase command and the erase startup-config command.
erase filesystem:
filesystem: | File system name followed by a colon. |
EXEC
This command first appeared in Cisco IOS Release 11.0.
When a file system is erased, none of the files in the file system can be recovered.
The erase command can be used on Class B Flash file systems only. To reclaim space on Flash file systems after deleting files using the delete command, you must use the erase command. This command erases all of the files in the Flash file system.
Class A Flash file systems cannot be erased. You can delete individual files using the delete command and then reclaim the space using the squeeze command. You can also use the format command to format the Flash file system.
On Class C Flash file systems, space is dynamically reclaimed when you use the delete command. You can also use the format command to format the Flash file system.
The erase nvram: command erases NVRAM. On Class A file system platforms, if the CONFIG_FILE variable specifies a file in Flash memory, the specified file will be marked "deleted."
The following example erases the NVRAM, including the startup configuration located there:
erase nvram:
The following example erases all of partition 2 in internal Flash memory:
Router# erase flash:2 System flash directory, partition 2: File Length Name/status 1 1711088 dirt/images/c3600-i-mz [1711152 bytes used, 15066064 available, 16777216 total] Erase flash device, partition 2? [confirm] Are you sure? [yes/no]: yes Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
The following example erases Flash memory when Flash is partitioned, but no partition is specified in the command:
Router# erase flash:
System flash partition information:
Partition Size Used Free Bank-Size State Copy-Mode
1 4096K 2048K 2048K 2048K Read Only RXBOOT-FLH
2 4096K 2048K 2048K 2048K Read/Write Direct
[Type ?<no> for partition directory; ? for full directory; q to abort]
Which partition? [default = 2]
The system will prompt only if there are two or more read/write partitions. If the partition entered is not valid or is the read-only partition, the process terminates. You can enter a partition number, a question mark (?) for a directory display of all partitions, or a question mark and a number (?number) for directory display of a particular partition. The default is the first read/write partition.
System flash directory, partition 2: File Length Name/status 1 3459720 master/igs-bfpx.100-4.3 [3459784 bytes used, 734520 available, 4194304 total] Erase flash device, partition 2? [confirm] <Return>
You can use the master indexes or search online to find documentation of related commands.
boot config
delete
more nvram:startup-config
show bootvar
undelete
To specify the level of prompting, use the file prompt global configuration command.
file prompt {alert | noisy | quiet}
alert | Prompts only for destructive file operations. This is the default. |
noisy | Confirms all file operation parameters. |
quiet | Seldom prompts for file operations. |
alert
Global configuration
This command first appeared in Cisco IOS Release 11.0.
Use this command to change the amount of confirmation needed for different file operations.
This command affects only prompts for confirmation of operations. The router will always prompt for missing information.
The following example configures confirmation prompting for all file operations:
file prompt noisy
To format a Class A or Class C Flash file system, use the format EXEC command.
format filesystem1 (Class C Flash file systems)![]() | Caution The following formatting procedure erases all information in the Flash memory. To prevent the loss of important data, proceed carefully. |
spare | (Optional) Reserves spare sectors as specified by the spare-number argument when formatting Flash memory. |
spare-number | (Optional) Number of the spare sectors to reserve on formatted Flash memory. Valid values are 0 to 16. The default value is zero. |
filesystem1 | Flash memory to format. |
filesystem2 | (Optional) File system containing the monlib file to use for formatting filesystem1. |
monlib-filename | (Optional) Name of the ROM monitor library file (monlib file) to use for formatting filesystem1. The default monlib file is the one bundled with the system software. When used with HSA and you do not specify the monlib-filename, the system takes ROM monitor library file from the slave image bundle. If you specify the monlib-filename, the system assumes that the files reside on the slave devices. |
The default monlib file is the one bundled with the system software.
EXEC
This command first appeared in Cisco IOS Release 11.0.
Use this command to format Class A or C Flash memory file systems.
In some cases, you might need to insert a new PCMCIA Flash memory card and load images or backup configuration files onto it. Before you can use a new Flash memory card, you must format it.
Flash memory cards have sectors that can fail. You can reserve certain Flash memory sectors as "spares" for use when other sectors fail. Use the format command to specify between 0 and 16 sectors as spares. If you reserve a small number of spare sectors for emergencies, you do not waste space because you can use most of the Flash memory card. If you specify zero spare sectors and some sectors fail, you must reformat the Flash memory card and thereby erase all existing data.
The monlib file is the ROM monitor library. The ROM monitor uses the monlib file to access files in the Flash file system. The Cisco IOS system software contains a monlib file.
In the command syntax, filesystem1 is the device to format and filesystem2 contains the monlib file to use. When you omit the [[filesystem2][monlib-filename]] argument, the system formats filesystem1 using the monlib that is bundled with the system software. When you omit filesystem2 from the [[filesystem2][monlib-filename]] argument, the system formats filesystem1 using the named monlib file from the device specified by the cd command. When you omit monlib-filename from the [[filesystem2][monlib-filename]] argument, the system formats filesystem1 using filesystem2's monlib file. When you specify the whole [[filesystem2:][monlib-filename]] argument, the system formats filesystem1 using the specified monlib file from the specified device. Note that you can specify filesystem1's own monlib file in this argument. When the system cannot find a monlib file, the system terminates the formatting process.
![]() | Caution You can read from or write to Flash memory cards formatted for Cisco 7000 series Route Processor (RP) cards in your Cisco 7200 series and Cisco 7500 series, but you cannot boot the Cisco 7200 series and Cisco 7500 series from a Flash memory card that is formatted for the Cisco 7000 series. Similarly, you can read from or write to Flash memory cards formatted for the Cisco 7200 series and Cisco 7500 series in your Cisco 7000 series, but you cannot boot the Cisco 7000 series from a Flash memory card that is formatted for the Cisco 7200 series and Cisco 7500 series. |
The following example formats a Flash memory card inserted in slot 0:
Router# format slot0: Running config file on this device, proceed? [confirm]y All sectors will be erased, proceed? [confirm]y Enter volume id (up to 31 characters): <Return> Formatting sector 1 (erasing) Format device slot0 completed
When the console returns to the EXEC prompt, the new Flash memory card is successfully formatted and ready for use.
You can use the master indexes or search online to find documentation of related commands.
copy
delete
dir
show (Flash file system)
squeeze
undelete
To check a Class C Flash file system for damage and repair any problems, use the fsck EXEC command.
fsck [/nocrc] filesystem
/nocrc | (Optional) Skips CRC checks. |
filesystem | File system to check. |
EXEC
This command first appeared in Cisco IOS Release 11.3 AA.
This command is only valid on Class C Flash file systems.
The following example checks the flash: file system:
Router# fsck flash: Fsck operation may take a while. Continue? [confirm] flashfs[4]: 0 files, 2 directories flashfs[4]: 0 orphaned files, 0 orphaned directories flashfs[4]: Total bytes: 8128000 flashfs[4]: Bytes used: 1024 flashfs[4]: Bytes available: 8126976 flashfs[4]: flashfs fsck took 23 seconds. Fsck of flash: complete
To retrieve a krb5 SRVTAB file from the specified host, use the kerberos srvtab remote global configuration command.
kerberos srvtab remote file-url
file-url | TFTP URL of the SRVTAB file on the specified host. |
Global configuration
This command first appeared in Cisco IOS Release 11.2.
When you use the kerberos srvtab remote command to copy the SRVTAB file from the remote host (generally the KDC), it parses the information in this file and stores it in the router's running configuration in the kerberos srvtab entry format. The key for each SRVTAB entry is encrypted with the private Data Encryption Standard (DES) key if one is defined on the router. To ensure that the SRVTAB is available (that is, that it does not need to be acquired from the KDC) when you reboot the router, use the copy system:running-config nvram:startup-config configuration command to save the router's running configuration.
The following example copies the SRVTAB file (scooter.cisco.com-new-srvtab) residing on bucket.cisco.com to the router:
kerberos srvtab remote tftp://bucket.cisco.com/scooter.cisco.com-new-srvtab
kerberos srvtab entry
key config-key
To create a new directory in a Class C Flash file system, use the mkdir EXEC command.
mkdir [directory]
directory | (Optional) Name of the directory to create. |
EXEC
This command first appeared in Cisco IOS Release 11.3 AA.
This command is only valid on Class C Flash file systems.
If you do not specify the directory name in the command line, the router prompts you for it.
The following example creates a directory called newdir:
Router# mkdir newdir Mkdir file name [newdir]? Created dir flash:newdir Router# dir Directory of flash: 2 drwx 0 Mar 13 1993 13:16:21 newdir 8128000 bytes total (8126976 bytes free)
You can use the master indexes or search online to find documentation of related commands.
To display a file, use the more EXEC command. The more nvram:startup-config command replaces the show startup-config command and the show configuration command. The more system:running-config command replaces the show running-config command and the write terminal command.
more [/ascii | /binary | /ebcdic] file-url
/ascii | (Optional) Displays a binary file in ASCII format. |
/binary | (Optional) Displays a file in hex/text format. |
/ebcdic | (Optional) Displays a binary file in EBCDIC format. |
file-url | URL of the file to display. |
EXEC
This command first appeared in Cisco IOS Release 11.3 AA.
You can use this command to display configuration files:
These commands shows the version number of the software used when you last changed the configuration file.
You can also display files on remote systems using the more command.
The following partial sample output displays the configuration file named startup-config in NVRAM:
Router# more nvram:startup-config ! ! No configuration change since last restart ! NVRAM config last updated at 02:03:26 PDT Thu Oct 2 1997 ! version 11.3 service timestamps debug uptime service timestamps log uptime service password-encryption service udp-small-servers service tcp-small-servers ... end
The following is partial sample output from the more nvram:startup-config command when the configuration file has been compressed:
rose# more nvram:startup-config Using 21542 out of 65536 bytes, uncompressed size = 142085 bytes ! version 11.3 service compress-config ! hostname rose ! ...
The following partial sample output displays the running configuration:
Router2# more system:running-config Building configuration... Current configuration: ! version 11.2 no service udp-small-servers no service tcp-small-servers ! hostname Router2 ! ... ! end
You can use the master indexes or search online to find documentation of related commands.
boot config
configure terminal
copy system:running-config nvram:startup-config
service compress-config
show bootvar
To show the current setting of the cd command, use the pwd EXEC command.
pwdThis command has no arguments or keywords.
EXEC
This command first appeared in Cisco IOS Release 11.0.
Use the pwd command to show what directory or file system is specified as the default by the cd command. For all EXEC commands that have an optional filesystem argument, the system uses the file system specified by the cd command when you omit the optional filesystem argument.
For example, the dir command contains an optional filesystem argument and displays a list of files on a particular file system. When you omit this filesystem argument, the system shows a list of the files on the file system specified by the cd command.
The following example shows that the present working file system specified by the cd command is slot 0:
Router> pwd slot0:/
The following example uses the cd command to change the present file system to slot 1 and then uses the pwd command to display that present working file system:
Router> cd slot1: Router> pwd slot1:/
You can use the master indexes or search online to find documentation of related commands.
To rename a file in a Class C Flash file system, use the rename EXEC command.
rename url1 url2
url1 | Original path name. |
url2 | New path name. |
EXEC
This command first appeared in Cisco IOS Release 11.3 AA.
This command is only valid on Class C Flash file systems.
In the following example, the file named Karen.1 is renamed test:
Router# dir Directory of disk0:/Karen.dir/ 0 -rw- 0 Jan 21 1998 09:51:29 Karen.1 0 -rw- 0 Jan 21 1998 09:51:29 Karen.2 0 -rw- 0 Jan 21 1998 09:51:29 Karen.3 0 -rw- 0 Jan 21 1998 09:51:31 Karen.4 243 -rw- 165 Jan 21 1998 09:53:17 Karen.cur 340492288 bytes total (328400896 bytes free) Router# rename disk0:Karen.dir/Karen.1 disk0:Karen.dir/test Router# dir Directory of disk0:/Karen.dir/ 0 -rw- 0 Jan 21 1998 09:51:29 Karen.2 0 -rw- 0 Jan 21 1998 09:51:29 Karen.3 0 -rw- 0 Jan 21 1998 09:51:31 Karen.4 243 -rw- 165 Jan 21 1998 09:53:17 Karen.cur 0 -rw- 0 Apr 24 1998 09:49:19 test 340492288 bytes total (328384512 bytes free)
To remove an existing directory in a Class C Flash file system, use the rmdir EXEC command.
rmdir [directory]
directory | (Optional) Directory to delete. |
EXEC
This command first appeared in Cisco IOS Release 11.3 AA.
This command is only valid on Class C Flash file systems.
If you do not specify the directory in the command line, the router prompts you for it.
The following example deletes the directory named newdir:
Router# dir Directory of flash: 2 drwx 0 Mar 13 1993 13:16:21 newdir 8128000 bytes total (8126976 bytes free) Router# rmdir newdir Rmdir file name [newdir]? Delete flash:newdir? [confirm] Removed dir flash:newdir Router# dir Directory of flash: No files in directory 8128000 bytes total (8126976 bytes free)
You can use the master indexes or search online to find documentation of related commands.
To display a list of open file descriptors, use the show file descriptors EXEC command.
show file descriptorsThis command has no arguments or keywords.
EXEC
This command first appeared in Cisco IOS Release 11.3 AA.
File descriptors are the internal representations of open files. You can use this command to see if another user has a file open.
The following is sample output from the show file descriptors command:
Router# show file descriptors
File Descriptors:
FD Position Open PID Path
0 187392 0001 2 tftp://dirt/hampton/c4000-i-m.a
1 184320 030A 2 flash:c4000-i-m.a
Table 5 describes the fields show in this display.
| Field | Description |
|---|---|
FD | File descriptor. The file descriptor is a small integer used to specify the file once it has been opened. |
Position | Byte offset from the start of the file. |
Open | Flags supplied when opening the file. |
PID | Process ID of the process that opened the file. |
Path | Location of the file. |
To display information about a file, use the show file information EXEC command.
show file information file-url
file-url | URL of the file to display. |
EXEC
This command first appeared in Cisco IOS Release 11.3 AA.
The following is sample output from the show file information command:
Router# show file information tftp://dirt/hampton/c2500-j-l.a tftp://dirt/hampton/c2500-j-l.a: type is image (a.out) [relocatable, run from flash] file size is 8624596 bytes, run size is 9044940 bytes [8512316+112248+420344] Foreign image Router# show file information slot0:c7200-js-mz slot0:c7200-js-mz: type is image (elf) [] file size is 4770316 bytes, run size is 4935324 bytes Runnable image, entry point 0x80008000, run from ram Router1# show file information nvram:startup-config nvram:startup-config: type is ascii text
Table 6 describes the possible file types.
| Field | Description |
|---|---|
image (a.out) | Runnable image in a.out format. |
image (elf) | Runnable image in elf format. |
ascii text | Configuration file or other text file. |
coff | Runnable image in coff format. |
ebcdic | Text generated on an IBM mainframe. |
lzw compression | Lzw compressed file. |
tar | Text archive file used by the CIP. |
To list available file systems, use the show file systems EXEC command.
show file systemsThis command has no arguments or keywords.
EXEC
This command first appeared in Cisco IOS Release 11.3 AA.
Use this command to learn the names of the file systems your router supports.
The following is sample output from the show file systems command:
Router# show file systems
File Systems:
Size(b) Free(b) Type Flags Prefixes
- - opaque rw null:
- - opaque rw system:
- - opaque ro xmodem:
- - opaque ro ymodem:
- - network rw tftp:
- - network rw rcp:
- - network rw ftp:
* 4194304 4190616 flash rw flash:
131066 129185 nvram rw nvram:
- - opaque wo lex:
Table 7 describes the fields shown in this display.
| Type | Description |
|---|---|
Size(b) | Amount of memory in the file system, in bytes. |
Free(b) | Amount of free memory in the file system, in bytes. |
Type | Type of file system. See Table 8. |
Flags | Permissions for file system. See Table 9. |
Prefixes | Prefix for file system. |
| Type | Description |
|---|---|
disk | The file system is for a rotating medium. |
flash | The file system is for a Flash memory device. |
network | The file system is a network file system (TFTP, rcp, FTP, etc.) |
nvram | The file system is for an NVRAM device. |
opaque | The file system is a locally generated "pseudo" file system (e.g., the "system") or a download interface, such as brimux. |
rom | The file system is for a ROM or EPROM device. |
tty | The file system is for a collection of terminal devices. |
unknown | The file system is of unknown type. |
| Flag | Description |
|---|---|
ro | The file system is Read Only. |
rw | The file system is Write Only. |
wo | The file system is Read/Write. |
To permanently delete Flash files by squeezing a Class A Flash file system, use the squeeze EXEC command.
squeeze filesystem:
filesystem: | Flash file system followed by a colon. |
EXEC
This command first appeared in Cisco IOS Release 11.1.
When Flash memory is full, you might need to rearrange the files so that the space used by the files marked "deleted" can be reclaimed. When you issue the squeeze command, the router copies all valid files to the beginning of Flash memory and erases all files marked "deleted." At this point, you cannot recover "deleted" files and you can write to the reclaimed Flash memory space.
In addition to removing deleted files, the squeeze command removes any files that the system has marked as error. An error file is created when a file write fails (for example, the device is full). To remove error files, you must use the squeeze command.
The following example instructs the router to permanently erase the files marked "deleted" from the Flash memory card inserted in slot 1:
squeeze slot1:
You can use the master indexes or search online to find documentation of related commands.
To configure a router or a Flash memory device on the router as a TFTP server, use the tftp-server global configuration command. This command replaces the tftp-server system command. To remove a previously defined filename, use the no form of this command with the appropriate filename.
tftp-server {file-url | rom} [alias alt-filename] [access-list-number]
file-url | Location of the file that the TFTP server uses in answering TFTP read requests. |
rom | Specifies TFTP service of a file in ROM. |
alias | (Optional) Specifies an alternate name for the file that the TFTP server uses in answering TFTP read requests. |
alt-filename | (Optional) Alternate name of the file that the TFTP server uses in answering TFTP read requests. A client of the TFTP server can use this alternate name in its read requests. |
access-list-number | (Optional) Basic IP access list number. Valid values are 0 to 99. |
Disabled
Global configuration
This command first appeared in Cisco IOS Release 11.0.
You can specify multiple filenames by repeating the tftp-server command. The system sends a copy of the system image contained in ROM or one of the system images contained in Flash memory to any client that issues a TFTP read request with this filename. On systems that contain a complete image in ROM, the system sends the ROM image if the requested filename is not found in Flash memory.
Images that run from ROM cannot be loaded over the network. Therefore, it does not make sense to use TFTP to offer the ROMs on these images.
On the Cisco 7000 family, the system sends a copy of the file contained on one of the Flash memory devices to any client that issues a TFTP read request with its filename.
In the following example, the system uses TFTP to send a copy of the version-10.3 file located in Flash memory in response to a TFTP read request for that file. The requesting host is checked against access list 22.
tftp-server flash:version-10.3 22
In the following example, the system uses TFTP to send a copy of the ROM image gs3-k.101 in response to a TFTP read request for the gs3-k.101 file:
tftp-server rom alias gs3-k.101
In the following example, the system uses TFTP to send a copy of the version-11.0 file in response to a TFTP read request for that file. The file is located on the Flash memory card inserted in slot 0.
tftp-server slot0:version-11.0
The following example enables a router to operate as a TFTP server. The source file c3640-i-mz is in the second partition of internal Flash memory:
tftp-server flash:2:dirt/gate/c3640-i-mz
access-list
To recover a file marked "deleted" on a Class A or Class B Flash file system, use the undelete EXEC command.
undelete index [filesystem:]
index | Number that indexes the file in the dir command output. |
filesystem: | (Optional) File system containing the file to undelete. |
The default file system is the one specified by the cd command.
EXEC
This command first appeared in Cisco IOS Release 11.0.
For Class A and B Flash file systems, when you delete a file, the Cisco IOS software simply marks the file as deleted, but it does not erase the file. This command allows you to recover a "deleted" file on a specified Flash memory device. You must undelete a file by its index because you could have multiple deleted files with the same name. For example, the "deleted" list could contain multiple configuration files with the name router-config. You undelete by index to indicate which of the many router-config files from the list to undelete. Use the dir command to learn the index number of the file you want to undelete.
You cannot undelete a file if a valid (undeleted) one with the same name exists. Instead, you first delete the existing file and then undelete the file you want. For example, if you had an undeleted version of the router-config file and you wanted to use a previous, deleted version instead, you could not simply undelete the previous version by index. You would first delete the existing router-config file and then undelete the previous router-config file by index. You can delete and undelete a file up to 15 times.
On Class A Flash file systems, if you try to recover the configuration file pointed to by the CONFIG_FILE environment variable, the system prompts you to confirm recovery of the file. This prompt reminds you that the CONFIG_FILE environment variable points to an undeleted file. To permanently delete all files marked "deleted" on a Flash memory device, use the squeeze command.
On Class B Flash file systems, you must use the erase command to recover any space taken up by deleted files.
The following example recovers the deleted file whose index number is 1 to the Flash memory card inserted in slot 0:
undelete 1 slot0:
You can use the master indexes or search online to find documentation of related commands.
To verify the checksum of a file on a Flash memory file system, use the verify EXEC command. This command replaces the copy verify and copy verify flash commands.
verify file-url
file-url | URL of the file to verify. |
The current working device is the default device.
EXEC
This command first appeared in Cisco IOS Release 11.0.
Use the verify command to verify the checksum of a file before using it.
Each software image that is distributed on disk uses a single checksum for the entire image. This checksum is displayed only when the image is copied into Flash memory; it is not displayed when the image file is copied from one disk to another.
The README file, which is included with the image on the disk, lists the name, file size, and checksum of the image. Review the contents of the README file before loading or duplicating the new image so that you can verify the checksum when you copy it into Flash memory or onto a server.
To display the contents of Flash memory, use the show flash command. The Flash contents listing does not include the checksum of individual files. To recompute and verify the image checksum after the image has been copied into Flash memory, use the verify command.
The following example verifies the file names c7200-js-mz on the Flash memory card inserted in slot 0:
Router# dir slot0: Directory of slot0:/ 1 -rw- 4720148 Aug 29 1997 17:49:36 hampton/nitro/c7200-j-mz 2 -rw- 4767328 Oct 01 1997 18:42:53 c7200-js-mz 5 -rw- 639 Oct 02 1997 12:09:32 foo 7 -rw- 639 Oct 02 1997 12:37:13 the_time 20578304 bytes total (3104544 bytes free) tw3-7200-1# verify slot0: Verify filename []? c7200-js-mz Verified slot0:
The following example also verifies the file named c7200-js-mz on the Flash memory card inserted in slot 0:
Router# verify slot0:? slot0:c7200-js-mz slot0:foo slot0:hampton/nitro/c7200-j-mz slot0:the_time Router# verify slot0:c7200-js-mz Verified slot0:c7200-js-mz
You can use the master indexes or search online to find documentation of related commands.
cd
copy
dir
pwd
show (Flash file system)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Fri Mar 5 17:38:56 PST 1999
Copyright 1989-1999©Cisco Systems Inc.