fsck

Checks and repairs a filesystem

fsck [options] [filesystem-list]

The fsck utility verifies the integrity of a filesystem and reports on problems it finds. This utility is a front end for filesystem checkers specific to a filesystem type (each checker is named fsck.type, where type is the filesystem type).

Arguments

The filesystem-list is required unless you use the -A option, in which case fsck checks all the filesystems listed in the /etc/fstab file.[5]

[5] The fsck utility does not check those entries in fstab that have a zero in the fifth (next-to-last) column.

On the command line there are two ways to list the filesystems you want fsck to check. You can either use the name of the device that holds the filesystem (for example, /dev/hda2 ...

Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.