COHERENT manpages

This page displays the COHERENT manpage for dcheck [Check directory consistency].

List of available manpages
Index


dcheck -- Command

Check directory consistency
dcheck [-s] [-i inumber...] filesystem ...

dcheck  checks  the  consistency  of  each  filesystem. It  scans  all  the
directories in each filesystem  and counts all i-nodes referenced.  It then
compares  its counts  against the  link counts  maintained in  the i-nodes.
dcheck notes  any discrepancies,  and notes  allocated i-nodes with  a link
count of zero.

The -i  argument tells dcheck to  compare each inumber in  the list against
those in each directory.  It  reports matches by printing the i-number, the
i-number  of the  parent directory,  and  the name  of the  entry.  The  -s
argument tells  dcheck to correct the  link count of errant  i-nodes to the
entry count.

Because  dcheck uses  two passes  to  check a  filesystem, the  file system
should be  unmounted.  If -s  is used on  the root file  system, the system
should be rebooted immediately  (without performing a sync). The raw device
should be used.

See Also

check,
commands,
icheck,
ncheck,
sync,
umount

Diagnostics

If the  link count is zero  and there are entries, the  file system must be
mounted and all entries removed  immediately.  If the link count is nonzero
and  the entry count  is larger,  the -s  option must be  used to  make the
counts agree.  In all other cases  there may be wasted disk space but there
is no danger of losing file data.

Notes

In earlier releases of COHERENT, dcheck acted upon a default file system if
none was specified.

This command has largely been replaced by fsck.