NEW-E2FSCK(8)

NAME
e2fsck - check a Linux second extended file system

SYNOPSIS
e2fsck [ -panyrdfvtFV ] [ -b superblock ] [ -B blocksize ] [ -l|-L bad_blocks_file ] device

DESCRIPTION
e2fsck is used to check a Linux second extended file system.

device
    is the special file corresponding to the device (e.g /dev/hdXX).

OPTIONS

-b superblock
    Instead of using the normal superblock, use the alternative superblock specified by superblock.

-d  Print debugging output (useless unless you are debugging e2fsck ).

-f  Force checking even if the file system seems clean.

-F  Flush the filesystem device's buffer caches before beginning. Only really useful for doing e2fsck time trials.

-l filename
    Add the blocks listed in the file specified by filename to the list of bad blocks.

-L filename
    Set the bad blocks list to be the list of blocks specified by filename. (This option is the same as the -l option, except the bad blocks list is cleared before the blocks listed in the file are added to the bad blocks list.)

-n  Open the filesystem read-only, and assume an answer of ``no'' to all questions. Allows e2fsck to be used non-interactively. (Note: if the -l or -L options are specified in addition to the -n option, then the filesystem will be opened read-write, to permit the bad-blocks list to be updated. However, no other changes will be made to the filesystem.)

-p  Automatically repair ("preen") the file system without any questions. The -a option is provided for backwards compatibility.

-t  Print timing statistics for e2fsck. If this option is used twice, additional timing statistics are printed on a pass by pass basis.

-v  Verbose mode.

-V  Print version information and exit.

-y  Assume an answer of ``yes'' to all questions; allows e2fsck to be used non-interactively.

EXIT CODE
The exit code returned by e2fsck is the sum of the following conditions:
    0    - No errors
    1    - File system errors corrected
    2    - File system errors corrected, system should
      be rebooted if file system was mounted
    4    - File system errors left uncorrected
    8    - Operational error
    16    - Usage or syntax error
    128    - Shared library error

AUTHOR
This version of e2fsck is written by Theodore Ts'o <tytso@mit.edu>.

SEE ALSO
mke2fs(8), tune2fs(8)