Directory Operations
File Operations
According to the operation objects, the operations on the file system fall into the
following categories:
Directory operation
■
File operation
■
Storage device operation
■
Prompt mode configuration
■
File path and file name can be represented in one of the following ways:
In URL (universal resource locator) format and starting with unit[ No.]>flash:/ ([ No.]
represents the unit ID of a switch). This method is used to specify a file on a specified
unit. For example, if the unit ID of a switch is 1, unit1>flash:/text.txt specifies the file
named text.txt and residing in the root directory.
Starting with flash:/. This method can be used to specify a file in the Flash of the
current unit.
Inputting the path name or file name directly. This method can be used to specify the
path to go to or a file in the current work directory.
The file system provides directory-related functions, such as:
Creating/deleting a directory
■
Displaying the information about the files or the directories in the current work
■
directory or a specified directory
Table 282 describes the directory-related operations.
Perform the following configuration in user view.
Table 282 Directory operations
Operation
Command
Create a directory
mkdir directory
Delete a directory
rmdir directory
Display the current
Pwd
work directory
Display the information
dir [ /all ] [ file-url ]
about specific
directories and files
Enter a specified
cd directory
directory
In the output information of the dir /all command, deleted files (that is, those in the
recycle bin) are embraced in brackets.
The file system also provides file-related functions, such as:
Deleting a file
■
Restoring a deleted file
■
Deleting a file completely
■
File System Configuration 327
Description
Optional
Optional
Only empty directories can be
deleted.
Optional
Optional
Optional
The default directory is the root
directory of Flash.