Check for filesystem consistency.
Use the e2fsck command to check the consistency of the file system for ext2 (Linux 2nd extended file system) and ext3 (Linux 2nd extended file system with journal and automatic record keeping).
Specify the device name of the volume to be checked as an argument.
Caution.
Since disk access while the inspection is in progress may destroy the system, it is safe to unmount any volume that can be unmounted when running the e2fsck command, and to run it in single-user mode if it contains a volume with / placed on it. Also, root privileges are required to run this e2fsck command.
[root@Lion ~]# e2fsck -cfpv /dev/sda ←Check the filesystem consistency of the volume "/dev/sda". /dev/sda is mounted.WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage.Do you really want to continue (y/n)? yes ←Enter "y" if the target volume is unmounted or running in single user mode/boot: recovering journal 35 inodes used (0.13%) 22 regular files |