OpenWindows Advanced User's Guide

2.3 Getting Help with OS Commands

This section describes various on-line help features. These features allow you to view reference information from your workstation or terminal.

Note -

The features described here are in addition to the OpenWindows help facilities.

2.3.1 Displaying Manual Pages with man

If you know the name of a command, but you are not sure what it does, the man command can be helpful. Type the following to find out more about this command:

$ man man

This command displays the first part of a SunOS manual reference page in the window display area. Press the Space Bar to see the next screen, or press the Q key to quit and return to the command prompt. Use the man command to see all the available options and to show the proper command syntax. Manual reference pages often provide examples which illustrate various uses of the command.

2.3.2 Displaying a One-line Summary with whatis

If you want just a one-line summary of the command's function, use the whatis command, as shown here:

$ whatis date
date (1)           -display or set the date

Notice the number in parentheses after the command name in the above example. This number indicates the section to which this command belongs. Commands are grouped into various categories according to function. Most user commands are in section 1. By common convention, the section number is displayed in parentheses after the name of the command. If you look for the printed manual reference page for a command, you will find it in alphabetical order within its group.

2.3.3 Keyword Lookup with apropos

Suppose you know what you want to do, but you're not sure of the command to use. Then the apropos command is helpful. This command locates commands by keyword lookup. The apropos command lists all commands whose one-line summaries contain any keywords you supply. This can lead to a very lengthy display, as some keywords may appear in many places.

For some examples of apropos output, try entering one or more of the following:

If you do enter a keyword that generates an unreasonably lengthy display, pressing Ctrl-C interrupts the display and returns you to the command prompt. (Hold down the Control key and press "c".)