mync technology

Oracle (Sun Microsystems) Solaris 10 O/S

Sun Lab Survival Guide

(formerly "Solaris Survival Guide" by Mike Boldin, Niagara College, 2000-2005)

Version 1.2
Last modified on 2011/09/07 01:36:19 by mboldin


More About Manual Pages

Adapted from www.techtricks.com/webstuff/unix/manpages.php
"Unix: Understanding Man Page References"
by Lance Leonard (September 2000)

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 or ssh 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 window, 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 or terminal 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. <Enter> scrolls forward one line of text.
  4. <q> quits the utility and returns you to your command prompt.
  5. <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

Note:  your pager program may also be less, which has more options than the standard UNIX more command.

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 syntax is:

$ apropos keyword

Obtaining more general information

While useful, man pages tend to be referential 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 of 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 in front 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(3C)." However, if you type:

$ man printf(3C)

at your command-line, you'll get an error message ("bash: syntax error near unexpected token `printf(3C'".)

To view this page, type this instead:

$ man -s 3C 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.

Back to Solaris Survival Guide