[BACK]Return to makemandb.8 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.sbin / makemandb

File: [cvs.NetBSD.org] / src / usr.sbin / makemandb / makemandb.8 (download)

Revision 1.7, Fri Nov 29 23:58:23 2013 UTC (10 years, 4 months ago) by wiz
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.6: +6 -5 lines

Wording improvements from Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>

.\" $NetBSD: makemandb.8,v 1.7 2013/11/29 23:58:23 wiz Exp $
.\"
.\" Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>
.\" All rights reserved.
.\"
.\" This code was developed as part of Google's Summer of Code 2011 program.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd November 23, 2013
.Dt MAKEMANDB 8
.Os
.Sh NAME
.Nm makemandb
.Nd parse the manual pages and build a search index for
.Xr apropos 1
.Sh SYNOPSIS
.Nm
.Op Fl floQqv
.Op Fl C Ar path
.Sh DESCRIPTION
The
.Nm
utility traverses the directories containing man pages, parses the manual
pages with the help of libmandoc and builds an Sqlite database
to support full text searches by
.Xr apropos 1 .
It obtains the list of directories to traverse using the
.Fl Ar path
and
.Fl p
options of
.Xr man 1 .
.Pp
It supports the following options:
.Bl -tag -width indent
.It Fl C Ar path
Use different
.Xr man 1
configuration file than the default,
.Pa /etc/man.conf .
.It Fl f
Force rebuilding the index from scratch, pruning the existing one.
.It Fl l
Limit the parsing to only the NAME section of the pages.
This option can be used to mimic the behavior of the classic
.Xr apropos 1
and also to substantially save disk space.
.It Fl o
Use this option to optimize the index for speed and also
to significantly reduce disk space usage.
This is a somewhat expensive operation.
.It Fl Q
Print only fatal error messages (i.e., when the database is left in
an inconsistent state and needs manual intervention).
.It Fl q
Print only warnings and error messages but no status updates.
.It Fl v
Enable verbose output.
This prints the name of every file being parsed
and a summary at the end of the index update.
.El
.Pp
.Nm .
.Ss DATABASE SCHEMA
The name of the FTS table is mandb and its schema is as follows:
.Bl -column -offset indent "Column Name" "Column Description"
.It Li section Ta The section number of the page
.It Li name Ta The name of the page from the NAME section.
.It Li name_desc Ta The one line description from the NAME section.
.It Li desc Ta The DESCRIPTION section.
.It Li lib Ta The LIBRARY section.
.It Li return_vals Ta The RETURN VALUES section.
.It Li env Ta The ENVIRONMENT section.
.It Li files Ta The FILES section.
.It Li exit_status Ta The EXIT STATUS section.
.It Li diagnostics Ta The DIAGNOSTICS section.
.It Li errors Ta The ERRORS section.
.It Li md5_hash Ta  MD5 checksum of the man page.
.It Li machine Ta The machine architecture (if any) for which the man
page is relevant.
.El
.Sh FILES
.Bl -hang -width /etc/man.conf -compact
.It Pa /etc/man.conf
The location of the Sqlite FTS database can be configured using the
.Cd _mandb
tag.
.El
.Sh SEE ALSO
.Xr apropos 1 ,
.Xr man 1 ,
.Xr whatis 1 ,
.Xr man.conf 5
.Sh AUTHORS
.An Abhinav Upadhyay