I'd like to find a program to do a particular operation.  How can I find out what program might do what I need and how to use it?

The Unix operating system comes with a full set of manual pages (man pages, for short) that describe all of the commands available to you.  It may take a little practice understanding the information on a man page.  It will be well worth your effort to learn how to use a man page to learn about a new program.  You will also often find that you need to look at a program's man page to refresh your memory on its usage.

If you know the name of the program type

man program-name

where program-name is the name of the program for which you want information.  The typical man page is broken up into several sections (every command does not have all of these sections):

What if I don't know the name of the command?

If you do not know the name of a command you often may be able to find it with one of the following two commands that are exactly equivalent:

apropos keyword

or

man -k keyword

Both of these commands search through all of the one line descriptions on all the man pages looking for keyword.  Any one line description containing keyword will be printed.  By judicious selection of a keyword these searches will usually find the command you are searching for.  It may take a few tries to determine the correct keyword to get the name of the command you need.   Once you have the command name look at its man page to determine if it will do what you need and exactly how it is used.

If you look at a man page and determine that it does not perform the operation you need, take a look at the SEE ALSO section.  This will show other commands closely related to the one you just looked at.  One of those might be appropriate for what you want.

Sometimes it seems like man pages for the wrong thing are displayed.  What is going on there?  How do I see what I really want?

The man pages are divided down into multiple sections.  All of the Unix commands that you can run from the command prompt are list in section 1.  It often happens that a particular name is used both as a command and a function or method in a library.   You might be looking for the command man page and the method or function is displayed instead. 

For example, running

man date

yields a man page for a function in the Fortran Library.  This is not very useful if you are trying to determine the options for the date command.

There are two ways to fix this.  First, if you want to look through all the man pages with the given name use the name

man -a program-name

This will print all the man pages for program-name in the order they are found.

The second solution for this problem requires you to know the section in which the man page is located.  You can get this information by running the man program with the -l option as in

man -l date

which gives a list of all man pages that are available for date.  In this case the output is

date (3f) -M /opt/SUNWspro/man
date (1)  -M /usr/man

The standard commands that you can run from the Unix command prompt are specified in section one.  To look at the man page for a command in a particular section you must use the -s option.  In the current example, to see only the man page for the date command you would execute

man -s 1 date


version 1.2, 2000/09/20 20:18:36, by csfac@RIT. All rights reserved.