Moves a file from the specified file system or relative to the current working directory to another file on the specified file system or relative to the current working directory.
old_name | Specifies the current name of the configuration or policy file on the system. |
new_name | Specifies the new name of the configuration or policy file on the system. |
N/A.
Make sure the renamed file uses the same file extension as the original file. If you change the file extensions, the file may be unrecognized by the system. For example, if you have an existing configuration file named test.cfg, the new file name must include the .cfg file extension.
You cannot rename an active configuration file (the configuration currently selected to boot the switch). To verify the configuration that you are currently using, run the show switch {detail} command. If you attempt to rename the active configuration file, the switch displays a message similar to the following:
Error: Cannot rename current selected active configuration file.
When you rename a file, the switch displays a message similar to the following:
Rename config test.cfg to config megtest.cfg on switch? (y/n)
Type y to rename the file on your system. Type n to cancel this process and keep the existing file name.
File names are case-sensitive. For example, if you have a configuration file named Test.cfg, and you attempt to rename the file with the incorrect case, for example test.cfg, the switch displays a message similar to the following:
Error: mv: unable to rename `/config/test.cfg': No such file or directory
Since the switch is unable to locate test.cfg, the file is not renamed.
Core dump files have a .gz file extension. The file name format is: core.process-name.pid.gz, where process-name indicates the name of the process that failed and pid is the numerical identifier of that process.
When you configure the switch to send core dump (debug) information to internal memory, specify the file path /usr/local/tmp to rename an existing core dump file. If you have a switch with a USB storage device installed, you can move and rename the core dump file to that location.
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.
The following command renames the configuration file named Testb91.cfg to Activeb91.cfg:
# mv Testb91.cfg Activeb91.cfg
The following example moves the configuration file named test1.cfg from the switch to the USB storage device:
# mv test1.cfg /usr/local/ext/test1.cfg
The following example moves the policy file named bgp.pol from the USB storage device to the switch:
# mv /usr/local/ext/bgp.pol bgp.pol
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.
This command is available on ExtremeSwitching X435, X440-G2, X450-G2, X460-G2, X465, X590, X620, and X695 series switches.