TechTricks
Technical answers from the trenches 
 
 
 
 

     
   
Unix: Understanding Man Page References
 
   
 Posted: 10 September 2000
 
   
Based on a variety of sources 
 
 
   
 
Audience: Beginner
 
       
   

Question: I keep seeing references to man pages. What are they and how do I use them?

Answer: Man pages provide the online manual for your Unix/Linux system; they are similar to Windows Help files. Man pages document a variety of details about your system, the software it contains, and special considerations.

To view a specific man page, telnet into your Unix server and type man <pagename> at your command prompt. For example, to view information about which, the utility that locates files on your server, type:

   man which

This locates the information, formats it for your telnet viewer, and then displays the results using the more utility. The which man page describes the utility's function, supported command-line switches, and additional details about various configuration-dependent options.

Using the man page viewer

Many man pages extend beyond the height of most telnet windows, e.g. they're normally longer than 25 lines. Use the following keys to scroll through the information:

  1. <Spacebar> scrolls forward one screen of text.
  2. <b> scrolls backward one screen of text.
  3. <Down Arrow> scrolls forward one line of text.
  4. <Up Arrow> scrolls backward one screen of text.
  5. <q> quits the utility and returns you to your command prompt.
  6. <h> displays help.

More supports a number of keyboard actions and options. For complete details, see the man page for more and its help file. To do this, type the following from your command prompt:

   man man

Locating man pages

To search for specific information, type:

   man -k <keyword>
where <keyword> is a word describing the information you're looking for. For example, to search for information regarding perl, type:
   man -k perl

This lists a number of relevant man pages and, in some cases, provides a brief description. If this is a long list, scroll through it using the keys shown above.

Please note that some systems support an alternate command for this: apropos. Its sytax is:

   apropos <keyword>

Obtaining more general information

While useful, man pages tend to be reference in nature. They provide specific details about the topic in question (such as all the command line options for various utilities); they do not often give background details or overviews. you can get this sort ofd information using the info utility. For example, for a general introduction to the man utility, type the following from your shell's command-line:

   info man

Like man, this displays information about the topic in question. Many of the keystrokes are the same. The info utility, however, adds an interesting feature: hyperlinks to other topics and pages. These are indicated with an asterisk infront of the topic's title. For example, info info displays the following:

File: info.info,  Node: Top,  Next: Getting Started,  Up: (dir)

Info: An Introduction
*********************

   Info is a program for reading documentation, which you are using now.

   To learn how to use Info, type the command `h'.  It brings you to a
programmed instruction sequence.

* Menu:

* Getting Started::             Getting started using an Info reader.
* Advanced Info::               Advanced commands within Info.
* Creating an Info File::       How to make your own Info file.

This screen contains four links: Menu, Getting Started, Advanced Info, and Creating an Info File. To choose one of these links, use the arrow keys to move the cursor to the asterisk in front of the topic you're interested in and then press <Enter>.

Other useful keys include:

  1. <n> Moves to the Next topic, which is Getting Start in the above example.
  2. <u> Selects the Up: topic, a directory listing of major topics.
  3. <p> Selects the Prev: topic, which appears when as you browse through various topics.

For full details about info (or man, for that matter), we suggest reading all info-related information.

Viewing Specific Man Pages

At times, man page references will refer to a page number for the topic. For example, you can control the formatting of perl variables using the printf function, which supports several format control characters. References to the supported format control characters are often expressed as "see printf(3)." However, if you type:

   man printf(3)

at your command-line, you'll get an error message ("Badly Placed ()'s").

To view this page, type this instead:

   man 3 printf

Man pages are an important part of the Unix/Linux operating systems. Understanding how to view them is critical for learning your way around your system and how to use it effectively.

 

       

Top

Feedback About Paradox Delphi Assorted Web Stuff
 
 
Copyright © 2000-2004, techtricks.com; All Rights Reserved.
Acknowledgements, Disclaimers, Terms and Conditions.
Article last updated on 01 June 2003

 

Other Sites: Paradox, Delphi, Perl, Web Stuff, and More


 

[- End -]