Linux e2fsck command
Linux e2fsck command is used to check the use of Linux ext2 file system partition works correctly.
grammar
e2fsck [-pacnydfvFV] [-b superblock] [-B blocksize] [-l|-L bad_blocks_file] [-C fd] device
Parameter Description:
- device: preliminary examination of the hard disk partition, for example: / dev / sda1
- -a: to partition do check if the problem will automatically repair functionality equivalent -p
- -b: set the storage location superblock
- -B: Set the size of the unit block
- -c: Check the partition for bad track
- -C File: the result of the check deposit to file in order to view
- -d: print debug result of e2fsck
- -f: Force checking
- -F: Before starting to check, the device's buffer cache emptied to avoid error
- -l bad_blocks_file: the bad track block inside information added bad_blocks_file
- -L Bad_blocks_file: setting a bad track block data stored to bad_blocks_file which, in the absence of the file is automatically generated
- -n: the file system [read-only] way open
- -p: do check on the partition, if the problem will automatically repair
- -v: detailed display mode
- -V: Shows the current version of e2fsck
- -y: preset check all the problems were answered [Yes]
Examples
Check the / dev / hda5 is normal, if there is an exception will be automatically repaired, and set if Q, are the answer [is]:
e2fsck -a -y /dev/hda5
Note:
When most of use e2fsck to check the situation of the hard disk partition, usually a special case, it is best to the partition umount, and then execute e2fsck to do the checking, if you want to have to check /, then go singal user mode execute again.