.TH check "" "" Command
.PC "Check file system"
\fBcheck [\-s] \fIfilesystem\fR ...
.PP
.HS
.SH Option:
.IC \fB\-s\fR
Salvage as much as possible, given the problems detected
.HE
.B check
uses the commands
.B icheck
and
.B dcheck
to check the consistency of a file system.
It acts on each argument
.I filesystem
in turn;
it calls first
.B icheck
and then
.B dcheck
on each to detect problems.
.PP
If
.B -s
is specified,
.B check
attempts to repair any errors automatically.
You should first unmount the file system, if possible.
If the root device is involved, you should
be in single-user mode and then
reboot the system immediately (without typing
.BR sync ).
.SH "See Also"
.Xr "clri," clri
.Xr "commands," commands
.Xr "icheck," icheck
.Xr "ncheck," ncheck
.Xr "sync," sync
.Xr "umount" umount
.br
.SH Notes
Certain errors, such as duplicated blocks,
cannot be fixed automatically.
Decisions must be made by a human.
.PP
In earlier releases of \*(CO,
.B check
acted upon a default file system if none was specified.
.PP
This command has largely been superceded by
.BR fsck .
