<HTML ><HEAD ><TITLE >How do I get `apropos' and `whatis' to work?</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Linux Man Page Howto" HREF="index.html"><LINK REL="PREVIOUS" TITLE="How do I get a high quality PostScript man page?" HREF="q11.html"><LINK REL="NEXT" TITLE="Copying conditions" HREF="copying.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Linux Man Page Howto</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="q11.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="copying.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="Q12" ></A >12. How do I get `apropos' and `whatis' to work?</H1 ><P >Suppose you wonder what compilers are installed on your system and how these can be invoked. To answer this (frequently asked) question you say</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="PROGRAMLISTING" >funnyprompt$ apropos compiler f77 (1) - Fortran 77 compiler gcc (1) - GNU C and C++ compiler pc (1) - Pascal compiler</PRE ></FONT ></TD ></TR ></TABLE ><P ><TT CLASS="LITERAL" >Apropos</TT > and <TT CLASS="LITERAL" >whatis</TT > are used to quickly report which man page has information on a certain topic. Both programs search a number of files named `whatis' that may be found in each of the manual base directories. As previously stated, the whatis data base files contain a one line entry for any man page in the respective directory tree. In fact, that line is exactly the NAME section (to be precise: joined on one line and with hyphenation removed; note that the section is mentioned within parentheses). The whatis database files are created with the <TT CLASS="LITERAL" >makewhatis</TT >(8) program. There are several versions around, so please refer to the man page to determine what options are available. In order for <TT CLASS="LITERAL" >makewhatis</TT > to be able to extract the NAME sections correctly it is important that you, the manual writer, adhere to the NAME section format described under <A HREF="q3.html" >question 3)</A >. The differences between <TT CLASS="LITERAL" >apropos</TT > and <TT CLASS="LITERAL" >whatis</TT > are simply where in the line they look, and what they are looking for. <TT CLASS="LITERAL" >Apropos</TT > (which is equivalent to <TT CLASS="LITERAL" >man -k</TT >) searches the argument string anywhere on the line, whereas <TT CLASS="LITERAL" >whatis</TT > (equivalent to <TT CLASS="LITERAL" >man -f</TT >) tries to match a complete command name only on the part before the dash. Consequently, `<TT CLASS="LITERAL" >whatis cc</TT >' will report if there is a <TT CLASS="LITERAL" >cc</TT > manual and remain quiet for <TT CLASS="LITERAL" >gcc</TT >.</P ><P >Corrections and suggestions welcome!</P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="q11.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="copying.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >How do I get a high quality PostScript man page?</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Copying conditions</TD ></TR ></TABLE ></DIV ></BODY ></HTML >