summaryrefslogtreecommitdiffstats
path: root/man/man8/mandb.man8
blob: cf7c242c142a77e3955f8ebcbeae1f0e71f651e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
'\" t
.\" Man page for mandb
.\"
.\" Copyright (C), 1994, 1995, Graeme W. Wilford. (Wilf.)
.\"
.\" You may distribute under the terms of the GNU General Public
.\" License as specified in the file COPYING that comes with the
.\" man-db distribution.
.\" 
.\" Tue Apr 26 12:56:44 BST 1994  Wilf. (G.Wilford@ee.surrey.ac.uk) 
.\"
.pc
.TH %thmandb% 8 "%date%" "%version%" "Manual pager utils"
.SH NAME
%mandb% \- create or update the manual page index caches
.SH SYNOPSIS
.B %mandb%  
.RB [\| \-dqsucpt?V \|]
.RB [\| \-C
.IR file \|]
.RI [\| manpath \|]
.br
.B %mandb%
.RB [\| \-dqsut \|]
.RB [\| \-C
.IR file \|]
.B \-f
.IR filename \ .\|.\|.
.SH DESCRIPTION
.B %mandb%
is used to initialise or manually update
.B index 
database caches that are usually maintained by 
.BR %man% .
The caches contain information relevant to the current state of the manual
page system and the information stored within them is used by the man-db 
utilities to enhance their speed and functionality.

When creating or updating an
.BR index ,
.B %mandb%
will warn of bad ROFF .so requests, bogus manual page filenames and 
manual pages from which the 
.B whatis 
cannot be parsed.

Supplying 
.B %mandb% 
with an optional colon-delimited path will override the internal system
manual page hierarchy search path, determined from information found within 
the man-db configuration file.
.SH "DATABASE CACHES"
.B %mandb%
can be compiled with support for any one of the following database types.

.TS
tab (@);
l lw(20m) l l.
Name@Type@Async@Filename
_
Berkeley db@T{
Binary tree
T}@Yes@\fIindex.bt\fR
GNU gdbm@T{
Hashed
T}@Yes@\fIindex.db\fR
UNIX ndbm@T{
Hashed
T}@No@\fIindex.(dir|pag)\fR
.TE

Those database types that support asynchronous updates provide enhanced
speed at the cost of possible corruption in the event of unusual
termination.
In an unusual case where this has occurred, it may be necessary to rerun
.B %mandb% 
with the 
.B \-c
option to re-create the databases from scratch. 
.SH OPTIONS
.TP
.if !'po4a'hide' .BR \-d ", " \-\-debug
Print debugging information.
.TP
.if !'po4a'hide' .BR \-q ", " \-\-quiet
Produce no warnings.
.TP
.if !'po4a'hide' .BR \-s ", " \-\-no-straycats
Do not spend time looking for or adding information to the databases
regarding stray cats.
.TP
.if !'po4a'hide' .BR \-p ", " \-\-no-purge
Do not spend time checking for deleted manual pages and purging them from
the databases.
.TP
.if !'po4a'hide' .BR \-c ", " \-\-create
By default, 
.B %mandb%
will try to update any previously created databases.
If a database does not exist, it will create it.
This option forces 
.B %mandb%
to delete previous databases and re-create them from scratch, and implies
.B \-\-no-purge.
This may be necessary if a database becomes corrupt or if a new database
storage scheme is introduced in the future.
.TP
.if !'po4a'hide' .BR \-u ", " \-\-user-db
Create user databases only, even with write permissions necessary to create
system databases.
.TP
.if !'po4a'hide' .BR \-t ", " \-\-test
Perform correctness checks on manual pages in the hierarchy search path.
With this option,
.B %mandb%
will not alter existing databases.
.TP
.if !'po4a'hide' .BR \-f ", " \-\-filename
Update only the entries for the given filename.
This option is not for general use; it is used internally by
.B %man%
when it has been compiled with the
.B MAN_DB_UPDATES
option and finds that a page is out of date.
It implies
.B \-p
and disables
.B \-c
and
.BR \-s .
.TP
.BI \-C\  file \fR,\ \fB\-\-config\-file= file
Use this user configuration file rather than the default of
.IR ~/.manpath .
.TP
.if !'po4a'hide' .BR \-? ", " \-\-help
Show the usage message, then exit.
.TP
.if !'po4a'hide' .BR \-\-usage
Print a short usage message and exit.
.TP
.if !'po4a'hide' .BR \-V ", " \-\-version
Show the version, then exit.
.SH "EXIT STATUS"
.TP
.if !'po4a'hide' .B 0
Successful program execution.
.TP
.if !'po4a'hide' .B 1
Usage, syntax, or configuration file error.
.TP
.if !'po4a'hide' .B 2
Operational error.
.TP
.if !'po4a'hide' .B 3
A child process failed.
.SH DIAGNOSTICS
The following warning messages can be emitted during database building.
.TP 
.B <filename>: whatis parse for page(sec) failed
An attempt to extract whatis line(s) from the given <filename> failed.
This is usually due to a poorly written manual page, but if many such
messages are emitted it is likely that the system contains non-standard
manual pages which are incompatible with the man-db whatis parser.
See the
.B WHATIS PARSING
section in
.BR lexgrog (1)
for more information.
.TP
.B <filename>: is a dangling symlink
<filename> does not exist but is referenced by a symbolic link. 
Further diagnostics are usually emitted to identify the <filename> of the
offending link. 
.TP
.B <filename>: bad symlink or ROFF `.so' request
<filename> is either a symbolic link to, or contains a ROFF include
request to, a non existent file.
.TP
.B <filename>: ignoring bogus filename
The <filename> may or may not be a valid manual page but its name is
invalid.
This is usually due to a manual page with sectional extension <x> being put
in manual page section <y>. 
.TP
.B <filename_mask>: competing extensions
The wildcard <filename_mask> is not unique.
This is usually caused by the existence of both a compressed and
uncompressed version of the same manual page.
All but the most recent are ignored.
.SH FILES
.TP
.if !'po4a'hide' .I %manpath_config_file%
man-db configuration file.
.TP
.if !'po4a'hide' .I /var/cache/man/index.(bt|db|dir|pag)
An FHS compliant global
.I index
database cache.
.PP
Older locations for the database cache included:
.TP
.if !'po4a'hide' .I /usr/man/index.(bt|db|dir|pag)
A traditional global
.I index
database cache.
.TP
.if !'po4a'hide' .I /var/catman/index.(bt|db|dir|pag)
An alternate or FSSTND
compliant global
.I index
database cache.
.SH "SEE ALSO"
.if !'po4a'hide' .BR lexgrog (1),
.if !'po4a'hide' .BR %man% (1),
.if !'po4a'hide' .BR manpath (5),
.if !'po4a'hide' .BR %catman% (8)
.PP
The
.B "WHATIS PARSING"
section formerly in this manual page is now part of
.BR lexgrog (1).
.SH AUTHOR
.nf
.if !'po4a'hide' Wilf. (G.Wilford@ee.surrey.ac.uk).
.if !'po4a'hide' Fabrizio Polacco (fpolacco@debian.org).
.if !'po4a'hide' Colin Watson (cjwatson@debian.org).
.fi