438 CHAPTER 22: FILE SYSTEM MANAGEMENT
Based on the operated objects, the file system can be divided as follows:
Directory operation
File operation
Storage device operation
Set the prompt mode of the file system
Directory Operation You can use the file system to create or delete a directory, display the current working
directory, and display the information about the files or directories under a specified
directory. You can use the following commands to perform directory operations.
Perform the following configuration in User View.
Table471 Directory Operation
File Attribute
Configuration
The app, configuration and web files support three attributes: main, backup and
none, as described in Table472.
A file can have both main and backup attributes; this kind of files are identified by *b.
The file with the main attribute will lose the main attribute when you assign the main
attribute to another file (which now has the main attribute). This ensures that there is
only one App/configuration/Web file having the main attribute in the flash memory. It
is the same with the backup attribute.
The operation on file and the operation on file attribute are separate. For example,
you delete a file with the main attribute from the flash memory; however, the
mapping relationship between the main attribute and the name of this file is not
cancelled. And after you download another valid file having the same name to the
flash memory, this new file will inherit the main attribute.
The file attribute characteristic of switch is compatible with the earlier released
versions. After the BootROM is updated, the original default App boot file takes the
main attribute.
Operation Command
Create a directory mkdir directory
Delete a directory rmdir directory
Display the current working directory pwd
Display the information about directories or files dir [ / all ] [ file-url ]
Change the current directory cd directory
Table472 File attribute description
Attribute
name Purpose Characteristic
Display
identifier
main Identify the main boot file, which
takes precedence over other files
when the switch starts up.
There can be respectively only one
App/configuration/Web file
having the main attribute in the
flash memory.
(*)
backup Identify the backup boot file,
which is used when the switch fails
to start up by using the main boot
file.
There can be respectively only one
App/configuration/Web file
having the backup attribute in the
flash memory.
(b)
none Identify other files whose attribute
is neither main nor backup.
None