Bookmark this page

Lab: Viewing and Printing Help Documentation

Performance Checklist

In this lab, you will practice research methods typically used by system administrators to learn how to perform necessary tasks.

Outcomes

  • Accomplish a given task; practice locating relevant commands by searching man pages and pinfo nodes.

  • Learn new options for commonly used documentation commands.

  • Recognize various document file formats; use appropriate tools to view and print documentation and other non-text formatted files.

Perform the following steps on serverX unless directed otherwise.

  1. Research man(1) to determine how to prepare a man page for printing. What format or rendering language is commonly used?

    [student@serverX ~]$ man man

    man uses -t to prepare a man page for printing, using PostScript.

  2. Create a formatted output file of the passwd man page. Determine the file content format.

    [student@serverX ~]$ man -t passwd > passwd.ps
    [student@serverX ~]$ file passwd.ps
    [student@serverX ~]$ less passwd.ps

    The file is in PostScript format, learned using the file command and confirmed by viewing the file contents. Notice the header lines of PostScript information.

  3. Research using man to learn the command(s) used for viewing or printing PostScript files after updating the manual page index cache.

    [student@serverX ~]$ su -
    Password: redhat
    [root@serverX ~]# mandb
    [root@serverX ~]# exit
    [student@serverX ~]$ man -k postscript viewer

    Using multiple words with the -k option finds man pages matching either word; those with "postscript" or "viewer" in their descriptions. Notice the evince(1) and ghostscript(1) (or gs(1)) commands in the output.

  4. Research evince(1) using man to learn how to use the viewer in preview mode. Also, determine how to open a document starting on a specific page.

    [student@serverX ~]$ man evince

    The -w (or --preview) option opens evince in preview mode. The -i option is used to specify a starting page.

  5. View your PostScript file using the various evince options you researched. Close your document file when you are finished.

    [student@serverX ~]$ evince passwd.ps
    [student@serverX ~]$ evince -w passwd.ps
    [student@serverX ~]$ evince -i 3 passwd.ps

    While normal evince mode allows full-screen and presentation-style viewing, the evince preview mode is useful for quick browsing and printing. Notice the print icon at the top.

  6. Using man, research lp(1) to determine how to print any document starting on a specific page. Without actually entering any commands (since there are no printers), what would be the syntax, on one command line, to print only pages 2 and 3 of your PostScript file?

    [student@serverX ~]$ man lp

    One answer is lp passwd.ps -P 2-3.

    From lp(1), learn that the -P option specifies pages. The lp command spools to the default printer, sending only the page range starting on 2 and ending on 3.

    Note

    There are currently no printers configured in the classroom. However, you may practice later using printer models configured in your own environment. Familiarity with these commands is often useful.

  7. Using pinfo, look for GNU info about the evince viewer.

    [student@serverX ~]$ pinfo evince

    Notice that the evince(1) man page displays instead. The pinfo document viewer looks for the relevant man page when no appropriate GNU documentation node exists for the requested topic. Press q to close pinfo.

  8. As an opportunity to observe the abundance of GNU fundamental utilities, use pinfo to locate and browse all document nodes for the coreutils commands and programs.

    [student@serverX ~]$ pinfo

    From the directory node, press DownArrow until the link is selected for Coreutils: Core GNU (file, text, shell) utilities. Press Enter to follow the link to GNU Coreutils. Notice the long menu listing, with Introduction currently selected. Press Enter. At the top of the screen, pay attention to the header, which displays the previous, current, and next nodes. Browse the information, press n for the next node, and repeat. Browse each screen, simply noticing the commands and their descriptions. Continue until node 29 Opening the Software Toolbox is reached. Read this chapter in its entirety using the navigation you have learned. When finished, return the way you came by using only LeftArrow until the top directory node is finally reached. Press q to close pinfo.

  9. Using firefox, open the system's package documentation directory and browse into the man-db package subdirectory. View the provided manual(s).

    [student@serverX ~]$ firefox /usr/share/doc

    Remember that bookmarks can be made for any directories that are frequently used. After browsing to the man-db directory, click to open and view the text version of the manual, then close it. Click to open the PostScript version. As observed earlier, evince is the system's default viewer for PostScript and PDF documents. You may wish to return to these documents later to become more knowledgeable about man. When finished, close the evince viewer.

  10. Using the open Firefox browser, locate and browse into the initscripts package subdirectory. View the sysconfig.txt file, which describes important system configuration options stored in the /etc/sysconfig directory.

    Notice how useful a browser is for locating and viewing local system documentation. Close the document when finished, but leave Firefox open.

Revision: rh124-7-1b00421