Deleting Switch Files
Page 7-4

Deleting Switch Files

You can use the rm command to delete files in the primary MPX’s flash memory. To use this
command, enter rm, followed by the name of the file you want to delete. For example, to
delete the file mpm.log, you would enter
rm mpm.log
at the UI prompt. The following screen will be displayed:
File system compaction in progress...
The switch will take a few seconds to delete the file and compact the flash memory.
Note
If you are connected to the primary MPX and you want
to remove files from a secondary MPX, use the mpmrm
command, which is described in Chapter 6, “Configur-
ing Management Processor Modules.”

Deleting Multiple Files

You can remove multiple files either by entering multiple file names in the command line or
by using wildcards.
When entering multiple file names, be sure to include a space between each file name you
want to delete. For example, to remove both the mpm.cfg and mpm.cnf files, you would enter
the following:
rm mpm.cfg mpm.cnf
Wildcards let you substitute an asterisk (*) for file name text. You can remove all files with
the same extension by entering rm, followed by an asterisk (*), a period (.), and the file
extension. For example, if you want to delete all the files with the log extension, enter
*.old
at the UI prompt. The following message will be displayed:
Remove the following?
/flash/mpm.log.old
/flash/mpm.old
Are you sure you want to remove this? (n)
Press the y key to delete the selected files or press <Enter> to cancel. If you press the y key,
the following will be displayed:
...2 files removed
The switch will take a few seconds to delete the file and compact the flash memory.
Note
If you want to delete all the image files (i.e., files with
the img extension), you can use the imgcl command,
which is described in Deleting All Image Files on page
7-5.