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 filename 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, issue 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)
Enter y to rename the file on your system. Enter n to cancel this process and keep the existing filename.
The memorycard option moves files between a removable storage device and the switch. If you use the memorycard option for both the old-name and the new-name, this command just renames a file on the removable storage device.
Filenames are case-sensitive. In this example, you have a configuration file named Test.cfg. If 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.
This section provides information about the characters supported by the switch for local filenames.
When naming a local or remote file, remember the requirements listed above.
Core dump files have a .gz file extension. The filename 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 the internal memory card, specify the internal-memory option to rename an existing core dump file. If you have a switch with a removable storage device installed, you can move and rename the core dump file to that location.
For information about configuring and sending core dump information to the internal memory card, see the configure debug core-dumps and save debug tracefiles memorycard commands.
The following command renames the configuration file named Testb91.cfg to Activeb91.cfg:
mv Testb91.cfg Activeb91.cfg
On a switch with a removable storage device installed, the following command moves the configuration file named test1.cfg from the switch to the removable storage device:
mv test1.cfg /usr/local/ext/test1.cfg
If you do not change the name of the configuration file, you can also use the following command to move the configuration file test1.cfg from the switch to a removable storage device:
mv /usr/local/ext
On a switch with a removable storage device installed, the following command moves the policy file named bgp.pol from the removable 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.
Pathname support was added in ExtremeXOS 15.5.1.
This command is available on the Summit X450-G2, X460-G2, X670-G2, X770, and ExtremeSwitching X440-G2, X590, X620, X690, X870 series switches.