- Table of Contents
-
- H3C WX3000 Series Unified Switches Switching Engine Configuration Guide-6W103
- 00-Preface
- 01-CLI Configuration
- 02-Login Configuration
- 03-Configuration File Management Configuration
- 04-VLAN Configuration
- 05-Auto Detect Configuration
- 06-Voice VLAN Configuration
- 07-GVRP Configuration
- 08-Basic Port Configuration
- 09-Link Aggregation Configuration
- 10-Port Isolation Configuration
- 11-Port Security-Port Binding Configuration
- 12-DLDP Configuration
- 13-MAC Address Table Management Configuration
- 14-MSTP Configuration
- 15-802.1x and System Guard Configuration
- 16-AAA Configuration
- 17-MAC Address Authentication Configuration
- 18-IP Address and Performance Configuration
- 19-DHCP Configuration
- 20-ACL Configuration
- 21-QoS-QoS Profile Configuration
- 22-Mirroring Configuration
- 23-ARP Configuration
- 24-SNMP-RMON Configuration
- 25-Multicast Configuration
- 26-NTP Configuration
- 27-SSH Configuration
- 28-File System Management Configuration
- 29-FTP-SFTP-TFTP Configuration
- 30-Information Center Configuration
- 31-System Maintenance and Debugging Configuration
- 32-VLAN-VPN Configuration
- 33-HWPing Configuration
- 34-DNS Configuration
- 35-Smart Link-Monitor Link Configuration
- 36-PoE-PoE Profile Configuration
- 37-Routing Protocol Configuration
- 38-UDP Helper Configuration
- 39-Acronyms
- 40-Index
- Related Documents
-
Title | Size | Download |
---|---|---|
28-File System Management Configuration | 66.03 KB |
Table of Contents
1 File System Management Configuration
File System Configuration Tasks
File System Configuration Example
Introduction to File Attributes
1 File System Management Configuration
The sample output information in this manual was created on the WX3024. The output information on your device may vary.
File System Configuration
Introduction to File System
To facilitate management on the device memory, the device provides the file system function, allowing you to access and manage the files and directories. You can create, remove, copy or delete a file through command lines, and you can manage files using directories.
File System Configuration Tasks
Complete the following tasks to configure the file system:
Task |
Remarks |
Optional |
|
Optional |
|
Optional |
|
Optional |
The device allows you to input a file path and file name in one of the following ways:
l In universal resource locator (URL) format and starting with “unit1>flash:/”. or “flash:/” This method is used to specify a file in the current flash memory.
l Entering the path name or file name directly. This method can be used to specify a path or a file in the current work directory.
Directory Operations
The file system provides directory-related functions, such as:
l Creating/deleting a directory
l Displaying the current work directory, or contents in a specified directory
Follow these steps to perform directory-related operations in user view:
To do… |
Use the command… |
Remarks |
Create a directory |
mkdir directory |
Optional |
Delete a directory |
rmdir directory |
Optional |
Display the current work directory |
pwd |
Optional |
Display the information about specific directories and files |
dir [ /all ] [ file-url ] |
Optional |
Enter a specified directory |
cd directory |
Optional |
l Only empty directories can be deleted by using the rmdir command.
l In the output information of the dir /all command, deleted files (that is, those stored in the recycle bin) are embraced in brackets.
File Operations
The file system also provides file-related functions listed in the following table.
Follow these steps to perform file operations in user view (except the execute command that should be executed in system view):
To do… |
Use the command… |
Remarks |
Delete a file |
delete [ /unreserved ] file-url delete { running-files | standby-files } [ /unreserved ] |
Optional A deleted file can be restored by using the undelete command if you delete it by executing the delete command without specifying the /unreserved keyword. |
Restore a file in the recycle bin |
undelete file-url |
Optional |
Delete a file from the recycle bin |
reset recycle-bin [ file-url ] [ /force ] |
Optional |
Rename a file |
rename fileurl-source fileurl-dest |
Optional |
Copy a file |
copy fileurl-source fileurl-dest |
Optional |
Move a file |
move fileurl-source fileurl-dest |
Optional |
Display the content of a file |
more file-url |
Optional Currently, the file system only supports displaying the contents of text files. |
Display the information about a directory or a file |
dir [ /all ] [ file-url ] |
Optional |
Enter system view |
system-view |
— |
Execute the specified batch file |
execute filename |
Optional This command should be executed in system view. |
l For deleted files whose names are the same, only the latest deleted file is kept in the recycle bin and can be restored.
l The files which are deleted by the delete command without the /unreserved keyword are actually moved to the recycle bin and thus still take storage space. You can clear the recycle bin by using the reset recycle-bin command.
l The dir /all command displays the files in the recycle bin in square brackets.
l If the configuration files are deleted, the device adopts the null configuration when it starts up next time.
Flash Memory Operations
Follow these steps to perform operations on the flash memory in user view:
To do… |
Use the command… |
Remarks |
Format the flash memory |
format device |
Required |
Restore space on the flash memory |
fixdisk device |
Required |
The format operation leads to the loss of all files, including the configuration files, on the flash memory and is irretrievable.
Prompt Mode Configuration
You can set the prompt mode of the current file system to alert or quiet. In alert mode, the file system will give a prompt for confirmation if you execute a command which may cause data loss, for example, deleting or overwriting a file. In quiet mode, such prompt will not be displayed.
Follow these steps to perform configuration on prompt mode of file system:
To do… |
Use the command… |
Remarks |
Enter system view |
system-view |
— |
Configure the prompt mode of the file system |
file prompt { alert | quiet } |
Required By default, the prompt mode of the file system is alert. |
File System Configuration Example
# Display all the files in the root directory of the file system.
<device> dir /all
Directory of unit1>flash:/
1 -rw- 1443 Apr 02 2000 02:45:13 startup.cfg
2 -rwh 151 Apr 02 2000 00:05:53 private-data.txt
3 (*) -rw- 1713 Apr 01 2000 23:57:11 vrpcfg.cfg
4 -rwh 356 Apr 02 2000 03:20:25 dsakey
5 -rwh 428 Apr 02 2000 03:21:59 hostkey
6 -rwh 572 Apr 02 2000 03:22:21 serverkey
6858 KB total (6848 KB free)
(*) -with main attribute (b) -with backup attribute
(*b) -with both main and backup attribute
# Copy the file flash:/startup.cfg to flash:/test/, with 1.cfg as the name of the new file.
<device> copy flash:/startup.cfg flash:/test/1.cfg
Copy unit1>flash:/startup.cfg to unit1>flash:/test/1.cfg?[Y/N]:y
..
%Copy file unit1>flash:/startup.cfg to unit1>flash:/test/1.cfg...Done.
# Display the file information after the copy operation.
Directory of unit1>flash:/
1 -rw- 1443 Apr 02 2000 02:45:13 startup.cfg
2 -rwh 151 Apr 02 2000 00:05:53 private-data.txt
3 (*) -rw- 1713 Apr 01 2000 23:57:11 vrpcfg.cfg
4 -rwh 356 Apr 02 2000 03:20:25 dsakey
5 -rwh 428 Apr 02 2000 03:21:59 hostkey
6 -rwh 572 Apr 02 2000 03:22:21 serverkey
7 drw- - Apr 02 2000 00:15:8 test
6858 KB total (6848 KB free)
(*) -with main attribute (b) -with backup attribute
(*b) -with both main and backup attribute
<device> dir unit1>flash:/test/
Directory of unit1>flash:/test/
1 -rw- 1443 Apr 02 2000 02:45:13 1.cfg
6858 KB total (6841 KB free)
(*) -with main attribute (b) -with backup attribute
(*b) -with both main and backup attribute
File Attribute Configuration
Introduction to File Attributes
The following two startup files support file attribute configuration:
l Configuration files: A configuration file is used to store and restore configuration, with .cfg as the extension.
l Web files: A Web file is used for Web-based network management, with .web as the extension.
The configuration files and Web files support three kinds of attributes: main, backup and none, as described in Table 1-1.
Table 1-1 Description on the file attributes
Attribute |
Description |
Feature |
Identifier |
main |
Identifies main startup files. The main startup file is used first for the device to start up. |
In the flash memory, there can be only one configuration file and one Web file with the main attribute. |
(*) |
backup |
Identifies backup startup files. The backup startup file is used after the device fails to start up using the main startup file. |
In the flash memory, there can be only one configuration file and one Web file with the backup attribute. |
(b) |
none |
Identifies files that are neither of main attribute nor backup attribute. |
— |
None |
A file can have both the main and backup attributes. Files of this kind are labeled *b.
Note that, there can be only one configuration file and one Web file with the main attribute in the flash memory. If a newly created file is configured to be with the main attribute, the existing file with the main attribute in the flash memory will lose its main attribute. This circumstance also applies to the file with the backup attribute in the flash memory.
File operations and file attribute operations are independent. For example, if you delete a file with the main attribute from the flash memory, the other files in the flash memory will not possess the main attribute. If you download a valid file with the same name as the deleted file to the flash memory, the file will possess the main attribute.
Configuring File Attributes
You can configure and view the main attribute or backup attribute of the startup file used for the next startup of a switch, and change the main or backup attribute of the file.
Follow these steps to configure file attributes:
To do… |
Use the command… |
Remarks |
Configure the Web file and its attribute |
boot web-package webfile { backup | main } |
Optional Available in user view |
Switch the file attributes between main and backup |
boot attribute-switch { all | app | configuration | web } |
Optional Available in user view |
Display the information about the app file used as the startup file |
display boot-loader [ unit unit-id ] |
Optional Available in any view |
Display information about the Web file used by the device |
display web package |
l Before configuring the main or backup attribute for a file, make sure the file already exists on the device.
l The configuration of the main or backup attribute of a Web file takes effect immediately without restarting the switch.
l After upgrading a Web file, you need to specify the new Web file in the Boot menu after restarting the device or specify a new Web file by using the boot web-package command. Otherwise, Web server cannot function normally.
l Currently, a configuration file has the extension of cfg and resides in the root directory of the flash memory.
l For the detailed configuration of configuration file attributes, refer to Configuration File Management in H3C WX3000 Series Unified Switches Switching Engine Configuration Guide.