109
A batch file is a set of executable commands. Executing a batch file is the same as executing the commands
in the batch file one by one.
Before executing a batch file, edit the batch file on your PC, and then download the batch file to the device.
If the suffix of the file is not .bat, use rename to change the suffix to .bat.
To execute a batch file:
Step Command Remarks
1. Enter system view.
system-view —
2. Execute a batch file. execute filename Required.
Performing storage media operations
Managing storage media space
CAUTION:
hen you format stora
e media, all files stored on it are erased and cannot be restored. If a startup
configuration file exists on the storage media, formatting results in loss of the startup configuration file.
When the space of a storage medium becomes inaccessible due to abnormal operations, use fixdisk to
restore it. The execution of the format command formats the storage medium, and all data on the storage
medium is deleted.
To manage the space of a storage medium:
Task Command Remarks
Restore the space of a storage medium. fixdisk device
Optional
Available in user view
Format a storage medium. format device
Optional
Available in user view
Displaying and maintaining the NAND flash memory
The physical space of the NAND flash memory is divided into multiple blocks, each of which is subdivided
into multiple pages. The NAND flash memory is erased on a block basis and read on a page basis; the
memory spaces are allocated on a page basis.
Displaying and repairing bad blocks
Bad block ratio varies with products of different vendors. The frequently used area of the memory goes bad
easily. Bad blocks cannot be used to store data, and the system has to skip the bad blocks when it allocates
storage spaces to files. Get the locations of bad blocks and repair them at the command line interface.