Using the Unix Man Pages


Man pages are nothing more than compressed text files, located in /usr/share/doc. The information included is a command reference. Occasionally there are even known bug statements found within man pages. One thing is for certain, thoughman pages are helpful if used properly.

As programs grew increasingly complex, they began to tax the man page format, so the info help format was created. These pages include a hierarchical structure, hypertext links for easy navigation between documents, and keyboard and mouse navigational tools. The first time you use info help (often when looking for help in the Emacs text editor), it can be a little overwhelming, but this format is not difficult to use once you have a feel for it.

Want to Know More? To learn more about info help, type info info at the shell prompt. This will allow you to read the tutorial.


As we will learn in the following sections, there are also many resources on the Internet that include man pages. For example, man pages can be found on Google or the Linux Documentation Project.

As just mentioned, you will eventually need some form of help in your Unix journey. Not all of your issues will be addressed in the man pages, but many of them will be. Help comes in different forms. For example, you may need help with a command such as ls. The ls command is used to list the names of files that are found in your current directory. In the man pages, you may see the syntax on the use of ls but not necessarily understand what you need to do with it. In other words, your problems may run deeper than the help provided in a man page. This is where time, practice, reading, and learning save the day. The man pages are only for your reference; they will not do anything for you unless you are able to understand what they say and perform the appropriate actions.

So why use man pages instead of the Internet or any other resource? To answer this question, remember the purpose of the man page: It's there to help you, not to do the work for you. All the information you need for the command syntax is found within that man page. If you want to look for further suggestions on use, then that's a different story. But why look outside the box when you have the answer inside the box? Check the man page first before you move on to other resources.

In addition, there is no definitive source for Unix information on the Internet. There are scattered resources that can help you if you know the specific vendor of the product you are using (SuSE, AIX, SCO ACE, and so forth) and the vendor provides support documentation. You may also find some good information if you are a master at searching the Internet, but chances are that this information will be secondhand at best. Because Unix users have always relied upon the system's own internals for assistance, man pages are the best-known resource for you as a Unix student. These pages are anywhere Unix is unless the files or links to them are damaged and in need of repair. To review, benefits of man pages include the following:

  • Man pages are the quickest and easiest source for complete information on how to use the commands on your system.

  • Man pages provide information on what programs do and how to use them.

  • Man pages cover other related utilities that you might be interested in working with. The recommendations on these pages could also be of help to you.

  • If you're a programmer or developer, man pages will also provide helpful programming information that you can use when coding and writing scripts.

To display a manual page, use the man command. By simply typing man followed by the command you want to look up, you will get the results you need.

 >man ls NAME      ls  list directory contents SYNOPSIS      ls [OPTION]... [FILE]... DESCRIPTION       List information about the FILEs (the current directory by default). (...) (output removed) 

In this example, the man pages showed you all the available syntax you can use with the ls command. You can use this information to get added details on the command.

As you can see, man pages do not enter a command for you, and they don't help you do a taskthey are simply informative. When using man pages, what you are looking for is additional information about a command; that way, you can customize the command with the many different switches that can be applied to it.

As you use man pages, you may find them unwieldy and long. Never fear, because there are shortcuts to using the help system. These are in the form of apropos and whatis.

Commands You Need to Know When you see a ... on your screen, there's more text to be read. What you need to do is press the Spacebar to see the additional text.

The man pages won't scroll automatically, so you may need to carry out this extra step. To stop this action, press q to quit the page and return to the command line.




    SAMS Teach Yourself Unix in 10 Minutes
    Sams Teach Yourself Unix in 10 Minutes (2nd Edition)
    ISBN: 0672327643
    EAN: 2147483647
    Year: 2005
    Pages: 170

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