rm

rm file_name

Description

Deletes an existing configuration, policy, or if configured, core dump file from the system.

Syntax Description

file_name Specifies the name of the configuration, policy file, or if configured, the core dump file to delete.

Default

N/A.

Usage Guidelines

After you delete a configuration or policy file from the system, that file is unavailable to the system.

You cannot delete an active configuration file (the configuration currently selected to boot the switch). To see which configuration that you are currently using, run the show switch {detail} command. If you attempt to delete the active configuration file, the switch displays a message similar to the following:

 Error: Cannot remove current selected active configuration file. 

When you delete a file from the switch, a message similar to the following appears:

Remove testpolicy.pol from /usr/local/cfg? (y/N) 

Type y to delete the file from your system. Type n to cancel the process and keep the file on your system.

Case-Sensitive File Names

File names are case-sensitive. For example, if you have a configuration file named Test.cfg, and you attempt to delete a file with the incorrect case, for example test.cfg, the system is unable to delete the file. The switch does not display an error message; however, the ls command continues to display the file Test.cfg. To delete the file, make sure you use the appropriate case.

Local File Name Character Restrictions

When specifying a local file name, the switch permits only the following characters:
  • Alphabetical letters, upper case and lower case (A-Z, a-z).
  • Numerals (0-9).
  • Period ( . ).
  • Dash ( - ).
  • Underscore ( _ ).

Core Dump Files

When you configure the switch to send core dump (debug) information to internal memory, specify the file path /usr/local/tmp.

For information about configuring and saving core dump information, see the configure debug core-dumps [ off | directory_path] and save debug tracefiles directory_path commands.

You can use the * wildcard to mass delete core dump files. Currently running and in-use files are not deleted.

If you configure the switch to save core dump files to internal memory and attempt to download a new software image, you might have insufficient space to complete the image download. When this occurs, you must decide whether to continue the software download or move or delete the core dump files from internal memory. To resolve this problem, if you have a switch with a USB storage device installed with space available, transfer the files to the USB device. Another option is to transfer the files from internal memory to a TFTP server. This frees up space on the internal memory while keeping the core dump files.

Example

The following example deletes the configuration file named Activeb91.cfg from the system:

# rm Activeb91.cfg

The following example deletes all of the core dump files stored in internal memory:

# rm /usr/local/tmp/*

The following example deletes the policy file named test.pol from the USB storage device:

# rm /usr/local/ext/test.pol

The following example deletes all of the configuration files from the USB storage device:

# rm /usr/local/ext/*.cfg

History

This command was first available in ExtremeXOS 10.1.

The memorycard option was added in ExtremeXOS 11.1.

The internal-memory option was added in ExtremeXOS 11.4.

Support for USB 2.0 storage devices was added in ExtremeXOS 12.5.3.

Path name support was added in ExtremeXOS 15.5.1.

Platform Availability

This command is available on all Universal switches supported in this document.