Initial import from FreeBSD RELENG_4:
[dragonfly.git] / gnu / usr.bin / man / makewhatis / makewhatis.1
1 .\" Copyright (c) 1994-1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD: src/gnu/usr.bin/man/makewhatis/makewhatis.1,v 1.14.2.6 2001/08/16 10:14:57 ru Exp $
26 .Dd January 12, 1995
27 .Dt MAKEWHATIS 1
28 .Os
29 .Sh NAME
30 .Nm makewhatis
31 .Nd create whatis database
32 .Sh SYNOPSIS
33 .Nm
34 .Op Fl a | Fl append
35 .Op Fl h | Fl help
36 .Op Fl i | Fl indent Ar column
37 .Op Fl L | Fl locale
38 .Op Fl n | Fl name Ar name
39 .Op Fl o | Fl outfile Ar file
40 .Op Fl v | Fl verbose
41 .Op Ar directories ...
42 .Sh DESCRIPTION 
43 .Nm
44 extracts the name and a short description from unformatted manpages
45 and creates the
46 .Xr whatis 1
47 database. 
48 .Nm
49 can read gzip'ed manpages.
50 .Ar Directory
51 names a directory containing manpage subdirectories
52 (named
53 .Pa man.+ ) .
54 Colons are treated as spaces, hence
55 .Ic makewhatis $MANPATH
56 or
57 .Ic makewhatis `manpath`
58 are allowed.
59 .Sh OPTIONS
60 .Bl -tag -width Ds
61 .It Fl a , Fl append
62 Append mode. Don't delete old entries in whatis database. Note: 
63 the new database will be sorted without repeated lines and
64 .Nm
65 does not check if old entries are valid.
66 .It Fl h , Fl help
67 Print options and exit.
68 .It Fl i , Fl indent Ar column
69 Justify description strings to
70 .Ar column
71 (default 24).
72 .It Fl L , Fl locale
73 Sense locale environment variables for possible localized man subdirectories
74 and process this entries only.
75 .It Fl n , Fl name Ar name
76 Use
77 .Ar name
78 instead of
79 .Pa whatis Ns .
80 .It Fl o , Fl outfile Ar file
81 Write all output to
82 .Ar file
83 instead of
84 .Pa dirname/whatis Ns .
85 .It Fl v , Fl verbose
86 Issue more warnings
87 (to stderr).
88 For every parsed man page write a single char:
89 .Ql .\&
90 for an uncompressed page,
91 .Ql *
92 for a compressed page, and
93 .Ql +
94 for a link.
95 .El
96 .Sh EXAMPLES
97 .Ic makewhatis $MANPATH
98 .Pp
99 Create whatis database for all directories in your
100 .Pa $MANPATH Ns .
101 .Pp
102 .Ic makewhatis -outfile /tmp/mywhatis /usr/local/man $HOME/man
103 .Pp
104 Create whatis database 
105 .Pa /tmp/mywhatis .
106 Traverse directories
107 .Pa /usr/local/man
108 and
109 .Pa $HOME/man Ns .
110 Don't create
111 .Pa /usr/local/man/whatis
112 or
113 .Pa $HOME/man/whatis Ns .
114 .Pp
115 .Ic makewhatis -name windex $HOME/man
116 .Pp
117 Create whatis database
118 .Pa windex
119 instead of
120 .Pa whatis Ns .
121 May be useful for Solaris.
122 .Sh FILES
123 .Bl -tag -width /etc/master.passwdxx -compact
124 .It Pa */man/whatis
125 whatis database
126 .It Pa /etc/periodic/weekly/320.whatis
127 run
128 .Nm makewhatis.local
129 every week
130 .El
131 .Sh SEE ALSO
132 .Xr apropos 1 ,
133 .Xr catman 1 ,
134 .Xr getNAME 1 ,
135 .Xr man 1 ,
136 .Xr manpath 1 ,
137 .Xr sort 1 ,
138 .Xr uniq 1 ,
139 .Xr whatis 1 ,
140 .Xr makewhatis.local 8
141 .Sh HISTORY
142 This
143 .Nm
144 command appeared in
145 .Fx 2.1 .
146 .Sh AUTHORS
147 .An Wolfram Schneider ,
148 Berlin.