DCHECK(8) — Unix Programmer’s Manual
NAME
dcheck − filesystem directory consistency check
SYNOPSIS
/etc/dcheck [ −i numbers ] [ filesystem ]
DESCRIPTION
Note: Dcheck is obsoleted for normal consistency checking by fsck(8).
Dcheck reads the directories in a filesystem and compares the link-count in each inode with the number of directory entries by which it is referenced. If the filesystem is not specified, a set of default filesystems is checked.
OPTION
−i numbers The −i flag is followed by a list of i-numbers. When one of these i-numbers appears in a directory, then the number, the i-number of the directory, and the name of the entry are reported.
The program is fastest if the raw version of the special file is used, since the i-list is read in large chunks.
FILES
Default filesystems vary with installation.
SEE ALSO
fsck(8), icheck(8), fs(5), clri(8), ncheck(8)
DIAGNOSTICS
When the program encounters a file for which the link-count and the number of directory entries disagree, the relevant facts are reported. Allocated files which have 0 link-count and no entries are also listed. The only dangerous situation occurs when there are more entries than links; if entries are removed, so the link-count drops to 0, the remaining entries point to nothing. They should be removed. When there are more links than entries, or there is an allocated file with neither links nor entries, some disk space may be lost but the situation will not degenerate.
BUGS
Since dcheck is inherently two-pass in nature, extraneous diagnostics may be produced if applied to active filesystems.
Dcheck is obsoleted by fsck and remains for historical reasons.
4th Berkeley Distribution — 1 August 1985