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