BSD 3 development
[unix-history] / usr / man / man1 / dcheck.1m
CommitLineData
e6817382
BJ
1.TH DCHECK 1M
2.SH NAME
3dcheck \- file system directory consistency check
4.SH SYNOPSIS
5.B dcheck
6[
7.B \-i
8numbers ]
9[ filesystem ]
10.SH DESCRIPTION
11.I Dcheck
12reads the directories in a file system
13and compares
14the link-count in each i-node with the number of directory
15entries by which it is referenced.
16If the file system is not specified,
17a set of default file systems
18is checked.
19.PP
20The
21.B \-i
22flag
23is followed by a list of i-numbers;
24when one of those i-numbers turns up
25in a directory,
26the number, the i-number of the directory,
27and the name of the entry are reported.
28.PP
29The program is fastest if the
30raw version of the special file is used,
31since the i-list is read in large chunks.
32.SH FILES
33Default file systems vary with installation.
34.SH "SEE ALSO"
35icheck(1), filsys(5), clri(1), ncheck(1)
36.SH DIAGNOSTICS
37When a file turns up for which the link-count and the number
38of directory entries disagree,
39the relevant facts are reported.
40Allocated files which have 0 link-count and no entries are also
41listed.
42The only dangerous situation
43occurs when there are more entries than links;
44if entries are removed,
45so the link-count drops to 0,
46the remaining entries point to thin air.
47They should be removed.
48When there are more links than entries, or there is
49an allocated file with neither links nor entries,
50some disk space may be lost but the situation will not degenerate.
51.SH BUGS
52Since
53.I dcheck
54is inherently two-pass in nature, extraneous diagnostics
55may be produced if applied to active file systems.