Deleting a file – Brocade Multi-Service IronWare Switching Configuration Guide (Supporting R05.6.00) User Manual
Page 104
74
Multi-Service IronWare Switching Configuration Guide
53-1003036-02
Verifying available flash space on the management module before an image is copied
3
The software will change the read-write attribute of the file in the file system that has the current
management focus (flash memory by default). However, you do not need to change the focus to
change this file attribute in a file system that does not currently have management focus. In this
case, you can specify the slot1 or slot2 keyword with the attrib command to change the attribute of
the file in the desired file system.
For example, to change the attribute of a file in slot2 to read-only, if flash memory has the
management focus, enter a command similar to the following.
Brocade# attrib slot2 ro goodcfg.cfg
Syntax: [no] attrib [slot1 | slot2] ro | rw file-name
Specify the slot1 or slot2 keyword to change the attribute of a file on the flash card in slot 1 or slot
2, respectively. If you do not specify one of these keywords, the command applies to the file system
that currently has the management focus.
The ro parameter specifies that the attribute of the file is set to read-only. The rw parameter
specifies that the attribute of the file is set to read-write.
The file-name parameter specifies the file for which to change the attribute.
For example, to change the attribute of all files on the flash card in slot 2 to read-only, if flash
memory has the current management focus, enter a command similar to the following.
Brocade# attrib slot2 ro *.*
Deleting a file
You can delete a file from flash memory or a flash card inserted in slot 1 or slot 2 on the
management module using the delete or rm command.
NOTE
The delete or rm command deletes all files in a file system unless you explicitly specify the files you
want to delete.
NOTE
The software does not support an undelete option for the flash memory file system. Be sure you
really want to delete the file before you issue this command.
The software will delete the file in the file system that has the current management focus. By
default, flash memory has the management focus. However, you do not need to change the focus
to delete the file in a file system that does not currently have management focus. In this case, you
can specify the /directory/file-name parameter with the delete or rm command to delete the file in
the desired file system.
For example, to delete a file in flash memory, if flash memory has the current management focus,
enter a command similar to the following.
Brocade# delete cfg.cfg
If the command is successful, the CLI displays a new command prompt.
Syntax: delete | rm [slot1 | slot2] [directory] [file-name]
You can enter either delete or rm for the command name.
Specify the slot1 or slot2 keywords to delete all files on the flash card in slot 1 or slot 2,
respectively.