add symlin(1)
[unix-history] / usr / src / old / dcheck / dcheck.8
CommitLineData
cf524f39
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
9bf6dd29 5.\" @(#)dcheck.8 6.1 (Berkeley) %G%
cf524f39 6.\"
9bf6dd29 7.TH DCHECK 8 ""
cf524f39
KM
8.UC 4
9.SH NAME
10dcheck \- file system directory consistency check
11.SH SYNOPSIS
12.B /etc/dcheck
13[
14.B \-i
15numbers ]
16[ filesystem ]
17.SH DESCRIPTION
18.B N.B.:
19.I Dcheck
20is obsoleted for normal consistency checking by
21.IR fsck (8).
22.PP
23.I Dcheck
24reads the directories in a file system
25and compares
26the link-count in each i-node with the number of directory
27entries by which it is referenced.
28If the file system is not specified,
29a set of default file systems
30is checked.
31.PP
32The
33.B \-i
34flag
35is followed by a list of i-numbers;
36when one of those i-numbers turns up
37in a directory,
38the number, the i-number of the directory,
39and the name of the entry are reported.
40.PP
41The program is fastest if the
42raw version of the special file is used,
43since the i-list is read in large chunks.
44.SH FILES
45Default file systems vary with installation.
46.SH "SEE ALSO"
15be7965 47fsck(8), icheck(8), fs(5), clri(8), ncheck(8)
cf524f39
KM
48.SH DIAGNOSTICS
49When a file turns up for which the link-count and the number
50of directory entries disagree,
51the relevant facts are reported.
52Allocated files which have 0 link-count and no entries are also
53listed.
54The only dangerous situation
55occurs when there are more entries than links;
56if entries are removed,
57so the link-count drops to 0,
58the remaining entries point to thin air.
59They should be removed.
60When there are more links than entries, or there is
61an allocated file with neither links nor entries,
62some disk space may be lost but the situation will not degenerate.
63.SH BUGS
64Since
65.I dcheck
66is inherently two-pass in nature, extraneous diagnostics
67may be produced if applied to active file systems.
68.PP
69.I Dcheck
70is obsoleted by
71.I fsck
72and remains for historical reasons.