A Unix operating system may paralyze the system after a sudden power failure. At this point, the Unix operating system is not as good as that of Microsoft. In the event of a power failure, the Windows operating system will automatically detect and recover when it is restarted, But Unix will not. We need to manually execute The fsck command to scan for recovery.
Generally, if the super block and Inode block on the hard disk are inconsistent with the copy in the memory, the system may fail to start. For example, when a sudden power failure occurs, the super block in the hard disk is not saved to the hard disk in time. This will cause the super block inconsistency between the two locations, and the integrity of the file system will be damaged. In severe cases, the operating system will be paralyzed. However, in case of such a file system error, you do not need to reinstall the operating system. Instead, you only need to execute the fsck command to fix Common Errors of most file systems.
Generally, If you execute # fsck-Y, the system will automatically fix the scan errors.
In addition, the most common options are:
P: Sorting (preen) Mode
F: force check mode. This option ignores the file system status flag. Author wan_2004