Section 3.1. The man Pages

   


3.1. The man Pages

Access the system reference manual pages (man pages) through the man command. To read the reference page on the man command itself, run the command line man man. Man pages generally contain reference documentation, not tutorial information, and are renowned for being so succinct that they are barely understandable at times. Nevertheless, when you need reference material, they can be exactly what you want.

Three programs provide access to man pages. The man program displays individual man pages, and the apropos and whatis commands search for a keyword in the set of man pages. The apropos and whatis commands search the same database; the difference is that whatis displays only lines that match exactly the word you are searching for, and apropos displays any line that contains the word you are searching for. That is, if you are looking for man, apropos matches manager and manipulation, whereas whatis matches only man separated from other letters by white space or by punctuation, as in man.config. TRy the commands whatis man and apropos man to see the difference.

Many of the man pages on a Linux system are part of a large package assembled by the LDP. In particular, the section 2 (system calls), section 3 (libraries), section 4 (special, or device, files), and section 5 (file formats) pages are mainly from the LDP's man-pages collection and are generally the pages most useful for programming. If you want to specify which section to look in, give the number of that section before the name of the man page you want to read. For example, man man gives the man page for the man command from section 1; if you want to see the specification for how to write man pages, you need to specify section 7 with man 7 man.

While you are reading man pages, remember that many system calls and library functions use the same names. In most cases, you want to know about the library functions to which you will be linking, not about the system calls that those library functions eventually call. Remember to use man 3 function to get the descriptions of library functions, because some library functions have the same names as system calls in section 2.

Also, be particularly aware that the C library man pages are maintained separately from the C library itself. Since the C library does not usually change behavior, that is not usually a problem. All the Linux distributions now use the GNU C library, introduced in Chapter 6. The GNU C library comes with full documentation, which is maintained with the library. This information is available in Texinfo form.


       
    top
     


    Linux Application Development
    Linux Application Development (paperback) (2nd Edition)
    ISBN: 0321563220
    EAN: 2147483647
    Year: 2003
    Pages: 168

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net