|
|
This appendix provides detailed descriptions of the commands used to maintain router memory. This appendix documents standard Cisco IOS router memory commands supported on the Cisco MC3810. These commands were first used on the Cisco MC3810 in the Cisco IOS 11.3(1)MA release.
| Old Command | New Command |
|---|---|
copy erase flash
| format (Class A and C Flash file systems only) |
copy verify or copy verify flash verify flash | fsck flash: |
For configuration information and examples, refer to the "Maintaining Router Memory" chapter in the Configuration Fundamentals Configuration Guide.
To change the default directory or filesystem, use the cd EXEC command.
cd [ flash: [directory]]
flash | Specify the flash filesystem. |
directory | (Optional) Specify the directory. |
The initial default filesystem is flash:. For platforms that do not have a physical device named flash:, the keyword flash: is aliased to the default Flash device.
EXEC
This command first appeared in Cisco IOS Release 11.0.
You can use the master indexes or search online to find documentation of related commands.
copy
delete
dir
pwd
show flash
undelete
To copy any file from a source to a destination, use the copy EXEC command.
The copy system:running-config nvram:startup-config command replaces the write memory command. The copy system:running-config ftp:, copy system:running-config rcp:, or copy system:running-config tftp: command replaces the write network command. The copy ftp: system:running-config, copy rcp: system:running-config, or copy tftp: system:running-config command replaces the configure network command. The copy ftp: nvram:startup-config, copy rcp: nvram:startup-config, or copy tftp: nvram:startup-config command replaces the configure overwrite-network command.
copyEXEC
This command first appeared in Cisco IOS Release 11.3 T.
The router will prompt for any missing pieces of the source and destination files or devices.
The entire copying process might take several minutes and differs from protocol to protocol and from network to network.
This section contains usage guidelines for the following situations:
Some invalid combinations exist. Specifically, you cannot copy the following:
Table A-2 describes the characters that you might see during processing of the copy command.
| Character | Description |
|---|---|
! | An exclamation point indicates that the copy process is taking place. Each exclamation point indicates that ten packets (512 bytes each) have been successfully transferred. |
. | A period indicates the copy process timed out. Many periods in a row typically mean that the copy process might fail. |
O | An uppercase O indicates a packet was received out of order and the copy process might fail. |
e | A lowercase e indicates a device is being erased. |
E | An uppercase E indicates an error and the copy process might fail. |
V | A series of uppercase Vs indicates the progress during the verification of the image checksum. |
1. The remote username specified in the file-url.
2. The username set by the ip rcmd remote-username command, if the command is configured.
3. The remote username associated with the current TTY (terminal) process. For example, if the user is connected to the router through Telnet and was authenticated through the username command, the router software sends the Telnet username as the remote username.
4. The router host name.
For the rcp copy request to execute successfully, an account must be defined on the network server for the remote username. If the network administrator of the destination server did not establish an account for the remote username, this command will not execute successfully. If the server has a directory structure, the configuration file or image is written to or copied from the directory associated with the remote username on the server. Use the ip rcmd remote-username command to specify which directory on the server to use. For example, if the system image resides in the home directory of a user on the server, you can specify that user's name as the remote username.
If you are writing to the server, the rcp server must be properly configured to accept the rcp write request from the user on the router. For UNIX systems, you must add an entry to the .rhosts file for the remote user on the rcp server. Suppose the router contains the following configuration lines:
hostname Rtr1 ip rcmd remote-username User0
If the router's IP address translates to Router1.company.com, then the .rhosts file for User0 on the rcp server should contain the following line:
Router1.company.com Rtr1
Refer to the documentation for your rcp server for more details. If you are using a personal computer as a file server, the computer must support rsh.
Use the copy local-url remote-url command to copy a system image or boot image from Flash memory to a network server. You can use the copy of the image as a backup copy. You can also use it to verify that the copy in Flash memory is the same as the original file.
Use the copy remote-url local-url command to copy an image from a server to Flash memory.
On Class B file system platforms, the system provides an option to erase existing Flash memory before writing onto it.
![]() | Caution Verify the image in Flash memory before booting the image. |
Use the copy:running-config command to load a configuration file from a network server to the router's running configuration. The configuration will be added to the running configuration as if the commands were typed in the command line interface. Thus, the resulting configuration will be a combination of the previous running configuration and the loaded configuration file, with the loaded configuration file having precedence.
You can copy either a host configuration file or a network configuration file. Accept the default value of host to copy and load a host configuration file containing commands that apply to one network server in particular. Enter network to copy and load a network configuration file containing commands that apply to all network servers on a network.
Use the copy :startup-config command to copy a configuration file from a network server to the router's startup configuration. These commands replace the startup configuration file with the copied configuration file.
Use the copy running-config remote-url command to copy the current configuration file to a network server using rcp or TFTP. Use the copy nvram:startup-config remote-url command to copy the startup configuration file to a network server using rcp or TFTP.The configuration file copy can serve as a backup copy.
Use the copy running-config startup-config command to copy the running configuration to the startup configuration.
![]() | Caution Some specific commands might not get saved to NVRAM. You will have to enter these commands again if you reboot the machine. These commands are noted in the documentation. We recommend that you keep a listing of these settings so you can quickly reconfigure your router after rebooting. |
If you issue the copy system:running-config nvram:startup-config command from a bootstrap system image, you receive a warning instructing you to indicate whether you want your previous NVRAM configuration to be overwritten and configuration commands to be lost. This warning does not appear if NVRAM contains an invalid configuration or if the previous configuration in NVRAM was generated by a bootstrap system image.
On all platforms except Class A filesystem platforms, the copy system:running-config nvram:startup-config command copies the currently running configuration to NVRAM.
On the Class A Flash file system platforms, the copy system:running-config nvram:startup-config command copies the currently running configuration to the location specified by the CONFIG_FILE environment variable. This variable specifies the device and configuration file used for initialization. When the CONFIG_FILE environment variable points to NVRAM or when this variable does not exist (such as at first-time startup), the software writes the current configuration to NVRAM. If the current configuration is too large for NVRAM, the software displays a message and stops executing the command.
The following applies to Class A Flash memory file system platforms:
To view the contents of environment variables, use the show bootenv command. To modify the CONFIG_FILE environment variable, use the boot config command. To modify the BOOTLDR environment variable use the boot bootldr command. To modify the BOOT environment variable, use the boot system command. To save your modifications, use the copy system:running-config nvram:startup-config command.
When the destination is specified by the CONFIG_FILE or BOOTLDR environment variable, the router prompts you for confirmation before proceeding with the copy. When the destination is the only valid image in the BOOT environment variable, the router also prompts you for confirmation before proceeding with the copy.
The following examples illustrate uses of the copy command. Depending on your platform, the output might be different from the output shown in the example.
The following examples use a copy rcp:, copy tftp:, or copy command to copy an image from a server to Flash memory.
Router# configure terminal Router# copy rcp flash Address or name of remote host []? 172.22.124.5 Source file name []? test Destination file name [test]? Connected to 172.22.124.5 Loading 16 byte file test: ! [OK]
Router# copy tftp 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]
**** NOTICE ****
Flash load helper v1.0
This process will accept the copy options and then terminate
the current system image to use the ROM based image for the copy.
Routing functionality will not be available during that time.
If you are logged in via telnet, this connection will terminate.
Users with console access can see the results of the copy operation.
---- ******** ----
Proceed? [confirm]
System flash directory, partition 1:
File Length Name/status
1 3459720 master/igs-bfpx.100-4.3
[3459784 bytes used, 734520 available, 4194304 total]
Address or name of remote host [255.255.255.255]? 172.16.1.1
Source file name? master/igs-bfpx-100.4.3
Destination file name [default = source name]?
Loading master/igs-bfpx.100-4.3 from 172.16.1.111: !
Erase flash device before writing? [confirm]
Flash contains files. Are you sure? [confirm]
Copy 'master/igs-bfpx.100-4.3' from TFTP server
as 'master/igs-bfpx.100-4.3' into Flash WITH erase? [yes/no] yes
The following examples use copy flash or copy file-id commands to copy images to a server for storage:
Router# copy flash rcp Source file name []? kk Address or name of remote host []? 172.22.124.5 Destination file name [kk]? Writing kk ! 99 bytes copied in 0.380 secs
Router# copy slot0: tftp: PCMCIA Slot0 flash Partition Size Used Free Bank-Size State Copy Mode 1 4096K 1671K 2424K 4096K Read/Write Direct 2 4096K 3068K 1027K 4096K Read/Write Direct 3 4096K 1671K 2424K 4096K Read/Write Direct 4 4096K 3825K 270K 4096K Read/Write Direct [Type ?<no> for partition directory; ? for full directory; q to abort] Which partition? [default = 1] 1 PCMCIA Slot0 flash directory, partition 1: File Length Name/status 1 1711088 /tftpboot/cisco_rules/c3600-i-mz [1711152 bytes used, 2483152 available, 4194304 total] Address or name of remote host [172.23.1.129]? Source file name? /tftpboot/cisco_rules/c3600-i-mz Destination file name [/tftpboot/cisco_rules/c3600-i-mz]? dirt/cisco_rules/c3700-i-mz Verifying checksum for '/tftpboot/cisco_rules/c3600-i-mz' (file # 1)... OK Copy '/tftpboot/cisco_rules/c3600-i-mz' from Flash to server as 'dirt/cisco_rules/c3700-i-mz'? [yes/no] yes !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Upload to server done Flash device copy took 00:00:23 [hh:mm:ss]
The following example shows how to use the copy rcp: system:running-config command:
Router#copy rcp: system:running-config Address or name of remote host []? 172.22.124.5 Source file name []? kk Destination file name [running-config]? Connected to 172.22.124.5 Loading 99 byte file kk: ! [OK]
The following example shows how to use the copy rcp:startup-config command:
Router# copy rcp: startup-config Address or name of remote host []? 172.22.124.5 Source file name []? kk Destination file name [startup-config]? Connected to 172.22.124.5 Loading 99 byte file kk: ! [OK]
The following example shows how to use the copy system:running-config rcp: command. This example specifies a remote username of netadmin1. Then it copies the running configuration file, named Rtr2-confg to the netadmin1 directory on the remote host with an IP address of 172.16.101.101.
Router# configure terminal Router(config)# ip rcmd remote-username netadmin1 Router(config)# Ctrl-Z Router# copy system:running-config rcp: Remote host[]? 172.16.101.101 Name of configuration file to write [Rtr2-confg]? Write file rtr2-confg on host 172.16.101.101?[confirm] Building configuration...[OK] Connected to 172.16.101.101
The following example shows how to use the copy nvram:startup-config rcp: command:
Router# configure terminal Router(config)# ip rcmd remote-username netadmin2 Router(config)# end Router# copy nvram:startup-config rcp: Remote host[]? 172.16.101.101 Name of configuration file to write [rtr2-confg]? <cr> Write file rtr2-confg on host 172.16.101.101?[confirm] <cr> ![OK]
The following example shows the copy system:running-config nvram:startup-config command and the warning the system provides if you are trying to save configuration information from bootstrap into the system:
Router(boot)# copy system:running-config nvram:startup-config Warning: Attempting to overwrite an NVRAM configuration written by a full system image. This bootstrap software does not support the full configuration command set. If you perform this command now, some configuration commands may be lost. Overwrite the previous NVRAM configuration?[confirm]
Enter no to escape writing the configuration information to memory.
On some routers, you can store copies of configuration files on a Flash memory device:
copy nvram:startup-config slot0:router-confg
Router# copy system:running-config slot1: PCMCIA Slot1 flash directory: File Length Name/status 1 1711088 dirt/images/c3600-i-mz [1711152 bytes used, 2483152 available, 4194304 total] Destination file name [running-config]? Building configuration... Erase flash device before writing? [confirm] no Copy 'running-config' as 'running-config' into flash device WITHOUT erase? [yes/no] yes ! [OK - 850/2483152 bytes] Verifying checksum... OK (0x16) Flash device copy took 00:00:00 [hh:mm:ss]
You can use the master indexes or search online to find documentation of related commands.
boot config
boot system flash
cd
copy xmodem flash
copy ymodem flash
delete
dir
erase bootflash
ip rcmd remote-username
reload
show bootvar
show bootflash
slave auto-sync config
write erase
To delete a file, use the delete EXEC command:
delete file-url
file-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 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.
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 router-backupconfig file from the Flash memory card inserted in slot 0:
delete :router-backupconfig
You can use the master indexes or search online to find documentation of related commands.
cd
dir
To display a list of files on a filesystem, use the dir EXEC command:
dirThere are no arguments or keywords for this command.
The default filesystem is that specified by the cd command. When you omit all keywords and arguments, the Cisco IOS software displays only undeleted files for the default filesystem in short format.
EXEC
This command first appeared in Cisco IOS Release 11.0.
Use the show filesystem command to display more detail about the files in a particular file system.
tw3-7200-1#dir /long slot0: Directory of / 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#dir slot0: Directory of/ 1 -rw- 4720148 Aug 29 1997 17:49:36 hampton/nitro/c3810-j-mz 2 -rw- 4767328 Oct 01 1997 18:42:53 c3810-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#dir /all slot0: Directory of / 1 -rw- 4720148 Aug 29 1997 17:49:36 hampton/nitro/c3810-j-mz 2 -rw- 4767328 Oct 01 1997 18:42:53 c3810-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 A-3 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 | File name. Deleted files are indicated by square brackets around the file name. |
You can use the master indexes or search online to find documentation of related commands.
cd
delete
undelete
To erase a filesystem, use the erase EXEC command:
erase [startup-config]
startup-config | Specify to erase the startup configuration. |
EXEC
This command first appeared in Cisco IOS Release 11.0.
When a filesystem is erased, none of the files in the filesystem can be recovered.
The erase command can be used on Flash memory file systems of Class B file system platforms only. To reclaim space on Flash memory 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 memory file system.
On Class C file system platforms, space is dynamically reclaimed when you use the delete command. You can also use the format command to format the Flash memory file system.
You can use the master indexes or search online to find documentation of related commands.
boot config
delete
show bootvar
show startup-config
undelete
To format a filesystem on a Class A or Class C file system platform, use the format EXEC command:
format filesystem1 (Class C file system platforms)![]() | 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 a device. |
spare-number | (Optional) Number of spare sectors to reserve on the formatted device. Valid values are 0 to 16. The default value is zero. |
filesystem1 | Device to format. |
filesystem2 | (Optional) Device 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 it is 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.
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 all existing data will be erased.
The monlib file is the ROM monitor library. The ROM monitor uses the monlib file to access files in the Flash memory 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.
The following example shows the format command that formats a Flash memory card inserted in slot 0:
Router# format 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 Cisco IOS software returns you 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 file
show flash
squeeze
undelete
To check a file system for damage and repair any problems on a Class C file system platform, use the fsck EXEC command:
fsck flash[:]
flash | Specify to check the flash file system. |
: | (Optional) Use the colon to specify a filename. |
EXEC
This command first appeared in Cisco IOS Release 11.3 T.
This command is only valid on Class C file system platforms.
The following example checks the flash: filesystem:
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 create a new directory in a filesystem on Class C file system platforms, 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 T.
This command is only valid on Class C file system platforms.
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.
moreEXEC
This command first appeared in Cisco IOS Release 11.3 T.
You can use this command to display configuration files. The more nvram:startup-config command displays the startup configuration file. The more system:running-config command displays the running configuration.
To display the contents of NVRAM (if present and valid), or to show the configuration file pointed to by the CONFIG_FILE environment variable, use the more nvram:startup-config EXEC command. NVRAM stores the configuration information on the network server in text form as configuration commands. The more nvram:startup-config command shows the version number of the software used when you last executed the copy system:running-config nvram:startup-config command.
For Class A Flash memory file systems, the more nvram:startup-config command shows the configuration file specified by the CONFIG_FILE environment variable. This variable specifies the configuration file used for initialization (startup). The Cisco IOS software informs you whether the displayed configuration is a complete configuration or a distilled version. A distilled configuration is one that does not contain access lists. If the CONFIG_FILE environment variable does not exist or is not valid, the software displays the NVRAM configuration (if it is a valid, complete configuration). Use the boot config command in conjunction with the copy system:running-config nvram:startup-config command to set the CONFIG_FILE environment variable.
Use the more system:running-config command in conjunction with the more nvram:startup-config command to compare the information in running memory to the information stored in NVRAM or in a location specified by the CONFIG_FILE environment variable.
The following partial sample output displays the configuration file startup-config in NVRAM:
tw3-7200-1# 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 ! hostname tw3-7200-1 ! boot system flash bootflash: ... 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 9.22 service compress-config ! hostname rose ! boot system flash gs7-k.sthormod_clean boot system rom (********* update output to recent release ***********)
The following partial sample output displays the running configuration:
Router2# show 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
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 filesystem is specified as the default by the cd command. For all EXEC commands that have an optional filesystem argument, the system uses the filesystem 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 filesystem. When you omit this filesystem argument, the system shows a list of the files on the filesystem specified by the cd command.
The following example shows that the present working filesystem specified by the cd command is slot 0:
Router> pwd slot0:/
You can use the master indexes or search online to find documentation of related commands.
cd
dir
To rename a file on a Class C file system platform, 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 T.
This command is only valid on Class C file system platforms.
To remove an existing directory in a filesystem on a Class C file system platform, use the rmdir EXEC command.
rmdir [directory]
directory | (Optional) Directory to delete. |
EXEC
This command first appeared in Cisco IOS Release 11.3 T.
This command is only valid on Class C file system platforms.
If you do not specify the directory in the command line, the router prompts you for it.
The following example deletes the directory 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 the layout and contents of a Flash memory filesystem, use the show EXEC command:
show filesystem [filesys]
filesystem | Flash memory filesystem. |
filesys | (Optional) Shows the Device Info Block, the Status Info, and the Usage Info. |
EXEC
The show flash all command first appeared in Cisco IOS Release 10.0. The remaining commands, such as chips and detailed, first appeared in Cisco IOS Release 10.3.
The show flash command displays the type of Flash memory present, any files that currently exist in Flash memory, and the amounts of Flash memory used and remaining.
The output of the show flash command depends on the type of Flash file system.
The following example shows sample output from the show flash command.
tw3-7200-1# show flash -#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name 1 .. unknown 317FBA1B 4A0694 24 4720148 Aug 29 1997 17:49:36 hampton/nitro/c7200-j-mz 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)
Table A-4 describes the fields shown in the output.
| Field | Description |
|---|---|
# | File's index number. |
ED | Whether the file contains an error (E) or is deleted (D). |
type | File's type (1 = configuration file, 2 = image file). The software displays these values only when the file's type is certain. When the file's type is unknown, the system displays unknown in this field. |
crc | File's cyclic redundant check. |
seek | Offset into the file system of the next file. |
nlen | Length of the file's name. |
length | Length of the file itself. |
date/time | Date and time the file was created. |
name | File's name. |
As the display shows, Flash memory can store and display multiple, independent software images for booting itself or for TFTP server software for other products. This feature is useful for storing default system software. These images can be stored in compressed format (but cannot be compressed by the router).
The following example shows the flash memory filesystem on the Cisco MC3810.
benchuut#show flash ? <cr> benchuut#show flash Directory of flash: 2 drwx 0 Mar 13 1993 13:23:01 thisone 8128000 bytes total (8126976 bytes free)
To list available filesystems, use the show file systems EXEC command.
show file systemsThis command has no arguments or keywords.
EXEC
The following shows a sample display 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:
- - tftp rw tftp:
- - rcp rw rcp:
* 8128000 4686336 flash rw flash:
This command first appeared in Cisco IOS Release 11.3 T.
Use this command to display the names of the file systems your router supports.
| 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 "psuedo" 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 display the layout and contents of Flash memory on the Cisco MC3810, use the following show flash EXEC command:
show flash [ filesys]
filesys | (Optional) Shows the Device Info Block, the Status Info, and the Usage Info. |
EXEC
The show flash command displays the type of Flash memory present, any files that currently exist in Flash memory, and the amounts of Flash memory used and remaining.
The following is a sample output from the show flash command:
Router# show flash Directory of flash: 3 -rwx 3440436 Mar 01 1993 00:16:01 mc3810-a2inr3v2-mz-1112 8128000 bytes total (4686336 bytes free)
To recover a deleted file on a Class A or Class C file system platform, use the undelete EXEC command:
undelete [filesystem]
filesystem | (Optional) Filesystem containing the file to undelete. |
The default filesystem is the one specified by the cd command.
EXEC
This command first appeared in Cisco IOS Release 11.0.
When you delete a file, the Cisco IOS software simply marks the file as deleted, but 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 determine 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 must 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.
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.
delete
dir
|
|