You can manage the storage devices, directories, and files after logging in to the FW through the console port, Telnet, or STelnet.
Table 1 lists the commands for managing storage devices.
All these commands need to be executed in the user view.
| 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. |
Table 2 lists the commands for managing directories.
All these commands need to be executed in the user view.
| Operation | Command | Description |
|---|---|---|
| Access a specific directory. | cd { .. | directory } |
|
| Display the current directory. | pwd | - |
| Display the files and subdirectories in the specific directory. | dir [ /all ] [ filename | /all-filesystems ] |
|
| 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. |
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).
| Operation | Command | Description |
|---|---|---|
| Display a file. | more file-name [ offset ] [ all ] |
|
| 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. |