MandrakeUser.Org - Your Mandrake-Linux Knowledge Base!


 
 

* DocIndex - Basics

Docs II

* Finding Documentation

* Handling 'man'

* Handling 'info'

Related Resources:

The Linux Documentation Project (LDP)
man pages online (in HTML and search-able)
Mdk User Guide, II.7
man man
man less
info info

Revision / Modified: April 20, 2002
Author: Tom Berger

 

* Finding Documentation

If you want to find out which documentation is included in an RPM run:

rpm -qld program_name if the package is already installed or
rpm -qpld package_name if not.

Example:

$ rpm -qld rpm
/usr/share/doc/rpm-4.0/GROUPS
/usr/share/doc/rpm-4.0/RPM-PGP-KEY
/usr/share/man/man8/rpm.8.bz2
/usr/share/man/man8/rpm2cpio.8.bz2

Please refer to the article on RPM if have difficulties with this (e.g. don't know which package a command belongs to).

If you want to load all these documents in a pager for reading, you can do that, too:

less $(rpm -qld rpm)

(This is called command substitution.)

Notice however, that you will have troubles reading HTML or man pages in 'less'. Better use suitable programs for them.

* section index * top

* Handling 'man'

Some important command line options are:

  • '-a' . Displays all pages that match a pattern. For example:whatis man displays this:

    man (1) - format and display the on-line manual pages
    man (7) - macros to format man pages
    man.config (5) - configuration data for man

    However man man only displays the first entry, man (1). Using man -a man will display the second, man (7), after having closed the first.
    This is because man pages are organized in directories according to content: 'man1' contains pages belonging to user commands, 'man2' system calls, 'man3' C functions, 'man4' file formats and device files, 'man5' configuration files, 'man6' games, 'man7' misc., 'man8' system administration, 'man9' kernel functions and 'mann' new commands. To get a man page from a specific section, use

    man section command

    e.g. man 7 man.

  • '-k'. Searches the first few lines of all man pages for a keyword. Similar to the 'apropos command' command.

  • '-K'. Full text search on all man pages for a given string. This may take quite a while...

man pages use the program 'less' for display. Therefore you can use all navigational shortcuts of 'less' like scrolling with <SPACE> or <RETURN>, bookmarking with <m>, searching forward with/pattern and backward with ?pattern, jumping from pattern to pattern using <n> or <N>. It is important to get used to these, since man pages can be very long. Type <h> in 'less' to get an overview on all available navigational commands.

You can use a lesser form of command line completion with the 'man' command. Type:
man tcl and hit first the <ESC> key and then <!>. The command will be completed to 'man tclsh'.
If the first letters of the man page are ambiguous or if there isn't a man page starting with these letters, nothing happens. This works with info pages, too.

man pages are stored in subdirectories of '/usr/share/man' and other places. As long as a man page is in one of these directories, 'man' will find it by looking at '/etc/man.config'. If you want to read a man page in a non-standard location, you have to supply the path to that file to the 'man' command, or use programs which are capable of rendering the 'man' macro language, like 'mc'.

* section index * top

* Handling 'info'

info files provide multi-level manuals which can be browsed by links. These links are marked by an asterisk (*). Put the cursor on one of them and hit<ENTER> to follow this link.
Info pages are organized by 'nodes', i.e. all pages are part of one hierarchical structure. You can display the top of this structure by typing just info.
The most important navigational shortcuts are:

  • <SPACE> (scrolling down page wise),
  • <BACKSPACE> (scrolling up page wise),
  • <b> and <e> (jump to beginning or end of node),
  • <TAB> (jump to next link in text) and
  • <ENTER> (follow link).

You can also navigate by nodes and levels:

  • <n> (next node),
  • <p> (previous node),
  • <u> (one level up),
  • <l> (back to previously displayed page).

<h> will give you detailed help and <?> a list of available info commands.

* section index * top

* 'grep' and documentation browsers


 
Legal: All texts on this site are covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB (Tom Berger) and Mandrakesoft 1999-2002.