.\" -*- nroff -*- .TH FSCK 8 "Jul 1993" "Version 1.8" .SH NAME fsck \- check and repair a Linux file system .SH SYNOPSIS .B fsck [ .B \-A ] [ .B \-V ] [ .B \-t .I fstype ] [ .B fs-options ] .I filesys .SH DESCRIPTION .B fsck is used to check and optionally repair a Linux file system. .I filesys is either the device name (e.g. /dev/hda1, /dev/sdb2) or the mount point (e.g. /, /usr, /home) for the file system. .PP The exit code returned by .B fsck is the sum of the following conditions: .br \ 0\ \-\ No errors .br \ 1\ \-\ File system errors corrected .br \ 2\ \-\ File system errors corrected, system should .br \ \ \ \ be rebooted if file system was mounted .br \ 4\ \-\ File system errors left uncorrected .br \ 8\ \-\ Operational error .br \ 16\ \-\ Usage or syntax error .br \ 128\ \-\ Shared library error .br The exit code returned when all file systems are checked using the .B -A option is the bit-wise OR of the exit codes for each file system that is checked. .PP In actuality, .B fsck is simply a front-end for the various file system checkers (\fBfsck\fR.\fIfstype\fR) available under Linux. The file system-specific checker is searched for in /etc/fs first, then in /etc and finally in the directories listed in the PATH environment variable. Please see the file system-specific checker manual pages for further details. .SH OPTIONS .TP .B -A Walk through the .I /etc/fstab file and try to check all file systems in one run. This option is typically used from the .I /etc/rc system initalization file, instead of multiple commands for checking a single file system. Note, that with this option, you cannot give the .I filesys argument as well. .TP .B -V Produce verbose output, including all file system-specific commands that are executed. Specifying this option more than once inhibits execution of any file system-specific commands. This is really only useful for testing. .TP .BI -t \ fstype Specifies the type of file system to be checked. If not specified, the type is deduced by searching for .I filesys in .I /etc/fstab and using the corresponding entry. If the type can not be deduced, the default file system type (currently minix) is used. .TP .B fs-options File system-specific options to be passed to the real file system checker. Although not guaranteed, the following options are supported by most file system checkers. .TP .I -a Automatically repair the file system without any questions (use this option with caution). .TP .I -l List all the file names in the file system. .TP .I -r Interactively repair the file system (ask for confirmations). .TP .I -s List the super block before checking the file system. .TP .I -v Produce verbose output. .SH BUGS All generic options must precede and not be combined with file system-specific options. Some file system-specific programs do not support the .I -v (verbose) option, nor return meaningful exit codes. .SH AUTHORS David Engel (david@ods.com) .br Fred N. van Kempen (waltje@uwalt.nl.mugnet.org) .br The manual page was shamelessly adapted from Remy Card's version for the ext2 file system. .SH SEE ALSO .BR mkfs (8), .BR fsck.minix (8), .BR fsck.ext (8), .BR fsck.ext2 (8), .BR fsck.xiafs (8).