|
|
This chapter explains the function and syntax of the Cisco IOS file system commands. For more information about defaults and usage guidelines, see the corresponding chapter of the Cisco IOS Configuration Fundamentals Command Reference, Release 12.1.
To change the default directory or file system, use the cd EXEC command.
cd [filesystem:]
Syntax Description
filesystem: (Optional) URL or alias of the directory or file system followed by a colon.
The copy source-url system:running-config command replaces the configure network command. See the description of the copy command for more information.
To copy any file from a source to a destination, use the copy EXEC command.
copy [/erase] source-url destination-url
Syntax Description
/erase (Optional) Erases the destination file system before copying. source-url The location URL or alias of the source file or directory to be copied. destination-url The destination URL or alias of the copied file or directory.
The erase bootflash: and erase bootflash commands have identical functions. See the erase command for more information.
To delete a file on a Flash memory device, use the delete EXEC command.
delete flash-url
Syntax Description
flash-url URL of the file to be deleted.
To display a list of files on a file system, use the dir EXEC command.
dir [/all] [filesystem: | file-url]
Syntax Description
/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.
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:
Syntax Description
filesystem: File system name followed by a colon. Fopr example, flash: or nvram:
To specify the level of prompting, use the file prompt global configuration command.
file prompt [alert | noisy | quiet]
Syntax Description
alert (Optional) Prompts only for destructive file operations. This is the default. noisy (Optional) Confirms all file operation parameters. quiet (Optional) Seldom prompts for file operations.
To format a Class A or Class C Flash file system, use the format EXEC command.
Class C Flash file system
format filesystem1:
Class A Flash file system
format [spare spare-number] filesystem1: [[filesystem2:][monlib-filename]]
![]() |
Caution Reserve a certain number of memory sectors as spares, in case you must reformat the Flash memory card. If you fail to specify spare sectors, all existing data will be erased. |
Syntax Description
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 followed by a colon. filesystem2: (Optional) File system containing the monlib file to use for formatting filesystem1 followed by a colon. monlib-filename (Optional) Name of the ROM monitor library file (monlib file) to use for formatting the filesystem1 argument. The default monlib file is the one bundled with the system software. When used with HSA and you do not specify the monlib-filename argument, the system takes ROM monitor library file from the slave image bundle. If you specify the monlib-filename argument, the system assumes that the files reside on the slave devices.
To check a Class C Flash file system for damage and repair any problems, use the fsck EXEC command.
fsck [/nocrc] filesystem:
Syntax Description
/nocrc (Optional) Skips CRC checks. filesystem: File system to check.
To create a new directory in a Class C Flash file system, use the mkdir EXEC command.
mkdir directory
Syntax Description
directory Name of the directory to create.
To display a file, use the more EXEC command.
more [/ascii | /binary | /ebcdic] file-url
Syntax Description
/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.
To show the current setting of the cd command, use the pwd EXEC command.
pwdSyntax Description
This command has no arguments or keywords.
To rename a file in a Class C Flash file system, use the rename EXEC command.
rename url1 url2
Syntax Description
url1 Original path name. url2 New path name.
To remove an existing directory in a Class C Flash file system, use the rmdir EXEC command.
rmdir directory
Syntax Description
directory Directory to delete.
The more nvram:startup-config command replaces the show configuration command. Refer to the more command for further details.
To display a list of open file descriptors, use the show file descriptors EXEC command.
show file descriptorsSyntax Description
This command has no arguments or keywords.
To display information about a file, use the show file information EXEC command.
show file information file-url
Syntax Description
file-url URL of the file to display.
To list available file systems, use the show file systems EXEC command.
show file systemsSyntax Description
This command has no arguments or keywords.
To permanently delete Flash files by squeezing a Class A Flash file system, use the squeeze EXEC command.
squeeze filesystem:
Syntax Description
filesystem: Flash file system followed by a colon.
To recover a file marked "deleted" on a Class A or Class B Flash file system, use the undelete EXEC command.
undelete index [filesystem:]
Syntax Description
index Number that indexes the file in the dir command output. filesystem: (Optional) File system containing the file to undelete.
To verify the checksum of a file on a Flash memory file system, use the verify EXEC command.
verify file-url
Syntax Description
file-url URL of the file to verify.
The erase nvam: command replaces the write erase command. See the erase command in this chapter for more information.
The more system:running-config command replaces the write terminal command. See the more command in this chapter for more information.
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Wed Jul 26 15:40:27 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.