1.\" $NetBSD: apropos.1,v 1.18 2016/06/17 18:48:07 abhinav Exp $ 2.\" 3.\" Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com> 4.\" All rights reserved. 5.\" 6.\" This code was developed as part of Google's Summer of Code 2011 program. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in 16.\" the documentation and/or other materials provided with the 17.\" distribution. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 22.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 23.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 24.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 25.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 27.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 29.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.Dd June 16, 2016 33.Dt APROPOS 1 34.Os 35.Sh NAME 36.Nm apropos 37.Nd search the complete content of all man pages 38.Sh SYNOPSIS 39.Nm 40.Op Fl 123456789hilMmPpr 41.Op Fl C Ar path 42.Op Fl n Ar results 43.Op Fl S Ar machine 44.Op Fl s Ar section 45.Ar query 46.Sh DESCRIPTION 47The 48.Nm 49utility performs a full text search over the complete content of all man pages. 50It uses the FTS engine of Sqlite to perform the search. 51The database is created with the help of the 52.Xr makemandb 8 53utility. 54.Pp 55This implementation of the 56.Nm 57utility is more sophisticated than the classical version. 58Like modern search applications, it uses advanced techniques like stemming 59and term weighting to rank the matching results in decreasing order of 60relevance. 61.Pp 62Quotes are optional for specifying multiword queries. 63.Pp 64It supports the following options: 65.Bl -tag -width indent 66.It Fl [1-9] 67Search only within the specified section of manual pages. 68.It Fl C Ar path 69Use different 70.Xr man 1 71configuration file than the default, 72.Pa /etc/man.conf . 73.It Fl h 74Turn on html formatting. 75.It Fl i 76Turn on terminal escape code formatting. 77.It Fl l 78Legacy mode: Only searches name and name description. 79Does not print context and turns off formatting. 80.It Fl M 81Do not show the context of the match. 82.It Fl m 83Show the context of the match (default). 84.It Fl n Ar results 85Output up to the specified number of search results. 86The default limit is infinity. 87.It Fl P 88Turn on pager formatting. 89.It Fl p 90Turn on pager formatting, and pipe the results through a pager (defaulting to 91.Xr more 1 ) . 92.It Fl r 93Turn off formatting. 94.It Fl S Ar machine 95Limit the search to the pages for the specified machine architecture. 96By default pages for all architectures are shown in the search results. 97.It Fl s Ar section 98Restrict the search to the specified section of the manual. 99By default, pages from all sections are shown. 100This option is for backwards compatibility with the classic version of apropos, 101using it is equivalent to using the 102.Op 123456789 103options directly. 104.El 105.Sh FILES 106.Bl -hang -width /etc/man.conf -compact 107.It Pa /etc/man.conf 108The location of the Sqlite FTS database can be configured using the 109.Cd _mandb 110tag. 111.El 112.Sh ENVIRONMENT VARIABLES 113The 114.Ev APROPOS 115environment variable is white-space tokenized as an argument vector 116and the options in it are parsed and set. 117Command line options override the environment options. 118.Sh SEE ALSO 119.Xr man 1 , 120.Xr whatis 1 , 121.Xr man.conf 5 , 122.Xr makemandb 8 123.Sh HISTORY 124The 125.Nm 126command appeared in 3.0BSD. 127It was rewritten in 128.Nx 6.0 129to support full text search using Sqlite. 130.Sh AUTHORS 131.An Abhinav Upadhyay 132