Check and repair a Linux file system.
fsck [options]
device_name
-A checks all file systems listed in the
/etc/fstab file.
-R skips the root file system (when checking all file systems).
-T does not show the title on startup.
-N shows what might be done but does not actually do anything.
-V produces verbose output.
-t
fstype specifies the file-system type (such as
ext2 ).
-n answers all confirmation requests with no (only for the
ext2 file system).
-p carries out all repairs without asking for confirmation (for
ext2 ).
-y answers all confirmation requests with yes (only for the
ext2 file system).
The
fsck command checks the integrity of a file system and carries out any necessary repairs. Depending on the type of file system,
fsck runs an appropriate command to check and repair the file system. For example, to check an
ext2 file system,
fsck runs the
e2fsck program. You have to run
fsck when you power down your system without running the
shutdown command. Typically,
fsck is automatically run during system startup.