edit this article

How to force a check of the file systems

I post this in part because a bunch of us were trying to help a person
with a bad directory/file that they could not remove. It turned out
that there was file system corruption. This trick might have cleaned
up the trouble and is a reasonable thing to do.

If the file "/forcefsck" exists a file system consistency check
(fsck) will be forced at the next boot up.

The command line commands look like:

touch /forcefsck
shutdown now -r
This is a better solution than pushing the reset button. It is true
that pushing the reset button will leave the file "/.autofsck" so file
system checks will take place. However other file systems are at risk
of damage. Also processes are killed with no warning and could leave
their good data in bad states on healthy file systems.

This trick has value because it is hard to run fsck on the root file
system. Boot time provides a special case where / can be checked.

T o m M i t c h e l l
From fedora list archive January 2004

rate this article:
current rating: average rating: 1.3 (46 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)