Delete command, Cisco
From NetworkCommands
A CLI command available on most Cisco platforms; used to delete files and directories on a local file system.
Contents |
Usage Syntax
noinclude/noinclude
Configuration Context: font color=purplePrivileged/Enable Mode/font
delete filesystem:file/dir_name [options]
Common options include;
- /force - do not prompt for confirmation
- /recursive - delete files in a directory as well as the directory itself
Usage Examples
delete flash:test.txt - delete file test.txt from local file system: flash
delete flash:test - delete empty directory test from local file system: flash
delete flash:test /recursive - delete directory test and the files within it from local file system: flash
Usage Notes
It is unclear if a deletion can actually be cancelled/stopped once it has started.
The /recursive option must be used when deleting directories that contain files or subdirectories.
Files deleted from flash memory file systems can be undeleted with the undelete command as they are simply marked as deleted, not actually erased.
A file can be deleted and undeleted up to 15 times.
To actually erase files marked as deleted, use the squeeze command.
Operational Keys
Use font color=dodgerblue[CTRL]/font+font color=limegreenC/font to cancel a deletion during the confirmation prompts.
Use font color=crimson[TAB]/font to auto-complete either file system, directory or file names.
Use ? at any point to get a list of all available file systems, directories or file names, depending on what you've typed so far.
Cisco Usage Notes
Use font color=limegreen?/font to display context sensitive help; a list of available commands, a list of available command parameters or a list of available files and/or file systems.
Use font color=crimson[TAB]/font to auto-complete commands or file names.
To make more effective use of the command line interface; filter show command output using Command Output Filters and use the available CLI Edit Keys.
font color=redDon't forget to save your changes using the copy run start command as necessary./font noinclude/noinclude
Related Commands
Use the dir command to display existing files and directories
Use the rmdir command to delete existing directories
Use the mkdir command to create new directories
Use the cd command to change directories
Use the pwd command to display the present working directory
Use the copy command to copy directories and files
Command Equivalents
The Linux command equivalent is the rm command, Linux
Command Alternatives
On some file systems, the rmdir command can also be used to delete directories
Related Articles
Information on other Cisco commands
Information on Cisco ADE commands
Information on Vyatta commands
Information on Extreme commands
Information on Nortel commands
Information on Zebra commands
Information on Linux commands
Information on F5 BigIP commands
Information on Windows commands
Information on Secure Platform commands
Information on Blue Coat SGOS commands
Information on Nokia IPSO commands








