fsck is a file system check and will restore anything not right in file system at a very fundamental level:
NAME
fsck - filesystem consistency check and interactive repair
details (if you want):
SYNOPSIS
fsck -p [-f] [-m mode]
fsck [-b block#] [-c level] [-l maxparallel] [-q] [-y] [-n] [-m mode]
[filesystem] ...
DESCRIPTION
The first form of fsck preens a standard set of filesystems or the speci-
fied filesystems. It is normally used in the script /etc/rc during auto-
matic reboot. Here fsck reads the table /etc/fstab to determine which
filesystems to check. Only partitions in fstab that are mounted ``rw,''
``rq'' or ``ro'' and that have non-zero pass number are checked.
Filesystems with pass number 1 (normally just the root filesystem) are
checked one at a time. When pass 1 completes, all remaining filesystems
are checked, running one process per disk drive. The disk drive contain-
ing each filesystem is inferred from the longest prefix of the device
name that ends in a digit; the remaining characters are assumed to be the
partition designator. In preening mode, filesystems that are marked
clean are skipped. Filesystems are marked clean when they are unmounted, when they have been mounted read-only, or when fsck runs on them success-
fully.
The kernel takes care that only a restricted class of innocuous filesys-
tem inconsistencies can happen unless hardware or software failures
intervene. These are limited to the following:
Unreferenced inodes
Link counts in inodes too large
Missing blocks in the free map
Blocks in the free map also in files
Counts in the super-block wrong