Previous Up Next

3  Getting Help

One of the more important things this document can teach you is how to find out more information, and more importantly useful information, for yourself. That way when presented with a problem you will hopefully be able to find what you need to solve it.

3.1  man

The primary help system on Unix systems is the so called “man pages”. Short for “manual pages” these documents literally form the entire manual for the system, and traditionally were written by the programmer who wrote the associated program (although professional technical writers are often employed by companies these days). They have a reputation for being useful to getting the problem solved, if, and only if, you can get through them. They have been called terse, juvenile, unhelpful and a host of other insults by users down the years but are still one of the most valuable repositories of Unix knowledge.

Really they aren’t that bad these days, but they can be quite dry reading. To access the manual for any program on your system just type:

% man program

Where program is the name of the program, e.g. “pwd”. The manual for that program will then be opened, usually you’ll can press the space bar for the next page, and “b” to go back a page. When you want to stop reading simply press “q”. Good man pages to read include: “intro”, “man”, “less” and “ls”, as well as any command used in an example above that you want to know more about.

3.2  info

Sometimes the man pages for commands will say something to the effect of “This is just a basic primer, the full documentation is part of the info-file system”. Essentially info is a program very similar to man, as far as the user is concerned. In situations like this you should be able to press “q” to drop out of man and then just type:

% info program

Where upon you should have the documentation for the program, again the space bar will move forwards a page, the “b” key should move backwards and “q” should quit. For more information see “info info”.

3.3  apropos

The man and info systems are all very well when you know what the programs you need to use are, but finding those programs if you don’t know them means a little more digging about. “man intro” is a good place to start for that as it lists most of the commands, but searching through it for what you want can be tiresome. And for that purpose another command was invented:

% apropos keyword

apropos will search the system for documentation that relates to the “keyword” given to it as an argument. So for example “apropos network” will list most of the programs that deal with networking on the system, “apropos files” lists most of the file management or manipulation programs. This makes apropos an invaluable tool in finding the programs you need to use to get the job done.

3.4  whatis

whatis is essentially the opposite of apropos, assuming you have a program name then whatis will give you a brief summery of what that program does. Its usage is fairly simple, e.g.

% whatis ls

Will tell you that “ls” is used to “list the contents of a directory”.

3.5  -help (dash help) and –help (dash dash help)

One of the final methods of getting help about a program is to use the program’s inbuilt help system. This is also a good way of finding out all the short and long flags which change how the program runs. Be warned, a lot of programs will give you the same message for both of these options, and you will have to hunt amid the short and long arguments for what you want.

Simply using the -help (dash help) option to get a listing of all the short flags for that program. Some programs prefer -h to list their short options, these programs will generally complain about ‘e’, ‘l’ and ‘p’ being bad options, these messages can generally be ignored.

Use --help (dash dash help) to get a list of all the long options for that program.

These also tend to provide a short message describing the program, nothing as long as the man pages, but a brief summary. Its worth noting that some programs don’t accept one of these two arguments and will instead run with their default options. This can be dangerous so its usually best to read the man pages first.

An example of this would be the “tar” program:

% tar -help

This command (which is “tar, space, dash help”) outputs an error message and says “Try ‘tar –help’ for more information.” so as you can see although it doesn’t support the option no harm is done by using -help, so to get the full set of flags use:

% tar --help

This will actually output a full list of flags, both short options (like -R) and long options (like --no-recursion).

3.6  The Library

C floor of the Library contains the computing section. In there you will find a number of introductory and in-depth references for Unix operating systems. Borrowing one of these, or even getting it out for a quick skim could help you immensely.

3.7  Google / Linux

Google, or more specifically any search engine on the Internet, is a good place to dig up a lot of information of varying levels of quality. With the recent rise of Linux and the free *nix’s Google has become a rather good problem solving tool for working with Unix systems.

Often the best way is just to offer the main http://www.google.com site a few keywords that seem related, such as the names of programs you’re using and what you’re trying to do. If this doesn’t get you any good results then searching http://groups.google.com (which is a comprehensive Usenet archive) might well get you the answer.

Beware advice gained in this way, the populace of the Internet isn’t composed of 100% Unix gurus and mistakes may be involved in the advice, always try and understand exactly what you’re doing before you do it.

3.8  LuBBs (http://www.lancs.ac.uk/socs/lubbs)

The Lancaster University Bulletin Board System is covered elsewhere in this document (see section 13.11) and it contains a fairly computer-literate slice of the population. If you can’t find the information you need within the above steps then trying LuBBs can be a good next step.


Previous Up Next