

dcheck                       Command                       dcheck




Directory consistency check


ddcchheecckk [ -ss ] [ -ii _i_n_u_m_b_e_r ... ] _f_i_l_e_s_y_s_t_e_m ...

dcheck performs a consistency check on each specified filesystem.
It scans all the  directories in each filesystem and keeps counts
of all i-nodes  referenced.  It compares these counts against the
link  counts maintained  in the i-nodes.   dcheck notes  any dis-
crepancies, and notes allocated i-nodes with a 0 link count.

If the -i switch is  present, dcheck compares 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  switch causes dcheck to correct the  link count of errant
i-nodes to the entry count.

Since dcheck  is two-pass, 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, dir.h, icheck, ncheck, sync, umount

***** Diagnostics *****

If the  link count is  0 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.













COHERENT Lexicon                                           Page 1


