Many applications provide documentation of their commands or libraries in the form of man pages (accessed using the man command). These are located in one of three places, depending on which class (target, host or cross) they fall into:
The target man pages can be displayed when logged into the target using the man command; for example:
target% man sleepIt is also possible to use the man command on the host to look at man pages of any class by specifying the path to the root of these man pages. So, for example, to look at the man page for the cross program sh4-linux-objcopy for the ST40 CPU:
host% man -M /opt/STM/STLinux-2.X/devkit/sh4/man sh4-linux-objcopyTo save having to enter the -M option every time, this can be set in the MANPATH environment variable.
Many of the GNU programs supplied with the Linux distribution use a different documentation system called info pages. These are a form of hyper-text documentation, which can be read by a number of programs.
info pages are installed similar to man pages, depending on the class of program they describe:
The easiest way to read info pages is to use the text based info command. As with man this can be run directly on the target to look at the target info pages. To display the top level info directory enter:
target% infoIndividual pages may be viewed through this menu, or viewed directly by providing the page name as an additional option to info. Not surprisingly, the info documentation is provided as info pages, so for more information on how to use info enter:
target% info infoNavigation in the info reader is performed using the cursor keys; when the cursor is positioned over a link pressing the return key will go to that link. Press the U key to go up to the previous level.
The target info pages (like the target man pages) can be viewed from the host. The command for this is, for example:
host% info --directory /opt/STM/STLinux-2.X/devkit/sh4/target/usr/share/infoTo save having to specify the full path every time it can be stored in the INFOPATH environment variable.
info pages can also be read by other programs, such as emacs.
Many packages come with documentation which does not fit into either of the categories above. In this case, the documentation is installed into a documentation directory which is specific to the package. Once again these are located in different places for each class of package. These locations are:
The format of these files is entirely dependent on the package, but most will be text files which can be read using any text editor.
The packages themselves include a small amount of information which at least gives a textual description of the package, as well as some details of when it was built. This information is displayed by the command:
host% rpm --query --info <package-name>Another --query option is --list, which displays a list of the files which are in the package. Use rpm --help, or the rpm man page to see other options.