fsck — Linux File System Check and Repair Tool.Summary: ‘fsck’ is used to check and optionally repair one or more Linux file systems. If no file-systems are specified on the command line, fsck will default to checking file-systems in /etc/fstab file. In actuality, fsck is simply a front-end for the various file system checkers (fsck.cramfs, fsck.ext2, fsck.ext3, fsck.jfs, fsck.msdos, fsck.reiserfs, fsck.vfat,..) available under GNU/Linux OS. Examples:
$ fsck -N -- Don't execute. Just show what would be done. # fsck -- Check all file systems available in /etc/fstab. # fsck -V -- Show detailed output, including all file system specific commands that are executed. # fsck -a -- Automatically repair the file system without asking for confirmations. (By default, ask for conformation). # fsck /dev/hda2 -- Check the HDA2 device/partition. # fsck /usr/local -- Check the /usr/local mount point. # fsck LABEL=usr -- Check file-system, which has a label matching to "usr".
Read: man fsck