Performing storage medium operations

Managing the space of a storage medium

When the space of a storage medium becomes inaccessible due to abnormal operations, you can use the fixdisk command to restore it. The execution of the format command formats the storage medium, and all the data on the storage medium is deleted.

Use the following commands to manage the space of a storage medium:

To do…

Use the command…

Remarks

 

 

 

Restore the space of a storage

fixdisk device

Optional

medium

Available in user view

 

 

 

 

Format a storage medium

format device

Optional

Available in user view

 

 

 

 

 

 

 

 

CAUTION:

When you format a storage medium, all the files stored on it are erased and cannot be restored. If a startup configuration file exists on the storage medium, formatting the storage medium results in loss of the startup configuration file.

Setting prompt modes

The system provides the following prompt modes:

alert—In this mode, the system warns you about operations that may bring undesirable consequences such as file corruption or data loss.

quiet—In this mode, the system does not prompt confirmation for any operation.

To prevent undesirable consequences resulting from mis-operations, the alert mode is preferred. Follow these steps to set the operation prompt mode:

To do…

Use the command…

Remarks

Enter system view

system-view

 

 

 

Set the operation prompt mode of

file prompt { alert quiet }

Optional

the file system

The default is alert.

 

 

 

 

Example for file operations

# Display the files and the subdirectories in the current directory.

<Sysname> dir Directory of flash:/

0 drw-

- Feb 16 2006 11:45:36 logfile

104