< Home

Managing the File System

You can manage the storage devices, directories, and files after logging in to the FW through the console port, Telnet, or STelnet.

Managing Storage Devices

Table 1 lists the commands for managing storage devices.

All these commands need to be executed in the user view.

Table 1 Commands for managing storage devices
Operation Command Description

Repair a storage device.

fixdisk device-name

If an exception occurs in the file system on a storage device, the FW notifies you to repair the storage device. Back up the files before repairing the storage device to avoid data loss.

Repairing the storage media hda1: will cause the device to be restarted.

Format a storage device.

format device-name

If the file system is abnormal or the data is no longer required, you can format the storage device.

In the formatting of the storage media hda1:, the device is restarted, the software packages and configuration files are backed up to device memory, and formatting is performed. After the device restart completes, the software packages and configuration files backed up earlier are restored to hda1:. If the software packages are damaged, the software packages backed up in the device restart of the last time in hda2: are used to restart the device. If the configuration files are damaged, the default configurations are used.

NOTICE:

The data cannot be restored after the storage device is formatted. Therefore, exercise caution when performing this operation.

Managing Directories

Table 2 lists the commands for managing directories.

All these commands need to be executed in the user view.

Table 2 Commands for managing directories
Operation Command Description
Access a specific directory. cd { .. | directory }
  • directory: specifies the name of the directory to be accessed in the current path.

  • path: specifies the name of the directory to be accessed in the specified path.

Display the current directory. pwd -
Display the files and subdirectories in the specific directory. dir [ /all ] [ filename | /all-filesystems ]
  • /all: Displays the information about all files, including deleted files. Deleted files are square-bracketed, for example, [ text ].

  • filename | directory: Displays the files and subdirectories of a specific directory. If the value is not specified, the dir command displays all files and subdirectories in the current directory.

  • /all-filesystems: displays information about files in all storage medium root directories.
Create a directory. mkdir make-remote-directory

make-remote-directory: specifies a directory name.

Delete a directory. rmdir delete-remote-directory

delete-remote-directory: specifies a directory name.

Managing Files

Table 3 lists the commands for managing files.

All these commands need to be executed in the user view, except execute filename and file prompt { alert | quiet } (in the system view).

Table 3 Commands for managing files
Operation Command Description
Display a file. more file-name [ offset ] [ all ]
  • file-name: specifies a file name.
  • offset: specifies the offset of file displaying.
  • all: indicates that all files are displayed at a time.
Copy a file. copy source-filename destination-filename -
Move a file. move source-filename destination-filename -
Rename a file. rename source-filename destination-filename -
Compress a file. zip source-filename destination-filename -
Decompress a file. unzip source-filename destination-filename -
Delete a file. delete [ /unreserved ] [ /quiet ] { filename | device-name }
NOTICE:
If the command carries the /unreserved parameter, the deleted file cannot be restored.
Restore a deleted file. undelete filename

The delete filename command deletes a file and puts it to the recycle bin. You can run the undelete filename command to restore it.

The dir /all command displays deleted files. The names of deleted files are square-bracketed, for example, [ text ].

If the current directory is not the root directory, use the absolute path to operate the file.

Delete files from the recycle bin. reset recycle-bin [ filename ] -
Run a batch file. execute filename This command runs only batch files with file name extension bat and stored on storage devices of the FW.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >