70.

function OpenWin(url, w, h) { if(!w) w = 400; if(!h) h = 300; window.open(url, "_new", "width=" + w + ",height=" + h + ",menubar=no,toobar=no,scrollbars=yes", true); }

Book: LPI Linux Certification in a Nutshell
Section: Chapter 8.  Exam 101 Review Questions and Exercises



8.4 Documentation (Topic 1.8)

8.4.1 Review questions

  1. Describe the PAGER environment variable.

    1. How does it affect the man facility?

    1. If PAGER is not set, how does man display output?

    2. Does this environment variable affect the info facility?

  2. In response to your query on a library function, man returns a page on an identically named user command. Why does this happen?

    1. How do you display the page for the function and not the command?

    2. How do you display both?

  3. Where are the HOWTO documents located on a typical Linux system?

  4. Name the program that displays GNU Texinfo pages.

  5. What is probably the most important skill you can offer to end users while staffing a helpdesk service?

8.4.2 Exercises

8.4.2.1 Exercise 1.8 -1. man and /usr/doc
  1. Run a man inquiry as follows:

    $ man -a -Pless mkfifo

    There is both a mkfifo command and a mkfifo function. You'll be looking at the mkfifo command from section 1 of the manual. Note MKFIFO(1) at the top of the page.

    Press the letter q to terminate the pager program. The pager is then invoked again and displays the mkfifo function from section 3 of the manual. Note MKFIFO(3) at the top of the page.

    Run the man command again, using the -Pmore option as follows:

    $ man -a -Pmore mkfifo
    1. What differences do you see in the output?

    2. What does the -P option do?

  2. Run another man inquiry as follows:

    $ man -d ln
    1. What output do you get from man?

    2. What is the -d option?

    3. Did you see information on the ln command?

    Now examine the man configuration file:

    $ less /etc/man.config

    Notice how the contents of this file coincide with the result you received from the -d option.

  3. Enter the following command:

    $ locate whois

    Note that locate shows two commands that match whois, along with a directory and a README file.

    Now use the stat program to evaluate the two commands:

    $ stat /usr/bin/whois /usr/bin/fwhois

    Examine the inode number for both files. An inode is a unique identifier, or node, of your Linux filesystem. The fact that these two files show the same inode indicates that they are links to the same file. That is, one file has two directory entries with different names. This means that you'll be running the same program regardless of which command name you use.

    Next, examine the README file that locate reported:

    $ less /usr/doc/fwhois-1.00/README

    Your version may be different. Now look for a manpage and an info page for this program:

    $ man fwhois $ info fwhois

    As you can see, the program author chose not to offer a manpage or an info page for fwhois, leaving the README in /usr/doc as the sole documentation for the program.

  4. Suppose you are Spanish-speaking and would like to learn about how to use Linux in your native tongue. Try the following commands:

    $ man spanish $ info spanish $ find /usr/doc -name "*anish*"
    1. Do the man and info utilities have anything to offer on Spanish?

    2. Did you find a document in /usr/doc that concerns Spanish?

8.4.2.2 Exercise 1.8-2. Internet documentation resources
  1. Using a Usenet news reader program, subscribe to comp.os.linux and comp.os.linux.advocacy.

    1. Of these, which has the highest volume, as indicated by the number of unread messages?

    2. Do you see messages of interest in these groups?

8.4.2.3 Exercise 1.8-3. Creating system documentation
  1. Using a text editor, create a text file named mycmd.1. Complete the following steps:

    1. This page is intended as an example of local documentation, so store it in /usr/local/man/man1/mycmd.1. Are there other files in this directory already? Why or why not?

    2. What happens when you execute the command:

      $  man mycmd

      Did you get the result you expected? Experiment with the formatting macros by adding italic and bold both on a per-line basis (.B) and an in-line basis (\fB).

8.4.2.4 Exercise 1.8-4. Acting as a Linux helpdesk

Suppose you are a helpdesk technician in a mixed-systems office, and you are relatively new to Linux. A user calls your helpdesk with a general question about Linux system shutdown. He indicates that he's heard from Unix gurus that using the halt command could be unsafe. He also reports getting frustrated with Windows NT users who use the Ctrl-Alt-Del key combination on his system console, which causes his Linux server to shut down. He asks for specific information on:

  • How to safely shut down Linux.

  • How to allow nonsuperusers the ability to shut down cleanly.

  • How to disable the Ctrl-Alt-Del shutdown.

Let's further assume you don't know how to answer these questions and that you have access to system documentation. Complete the following steps:

  1. Use the man facility to investigate the halt command. Based on what you find there, answer the following:

    1. In what section of the manual is halt located? Why?

    2. Determine if it is "safe" to use halt to shut down Linux. What caused the Unix gurus to instruct the caller that using halt was not safe?

    3. Determine if it would still be safe if the user uses the -n option to halt.

    4. Is it appropriate to use halt on a multiuser system to which others are logged in?

    5. Use man on the other commands referred to by the halt manpage in the SEE ALSO section.

  2. Evaluate the other commands:

    1. Which commands can be used to shut down the system in place of halt?

    2. Which commands would be the most appropriate for shutting down a multiuser system?

  3. From what you see in the manpages:

    1. Where is the Ctrl-Alt-Del system shutdown configured?

    2. Explain how to disable it.

    3. Do you need to reboot to enable the change? If so, why?

    4. How can you configure the system to allow specified nonsuperusers to shut down cleanly?

    5. If you use the info command, are you provided with additional information?

  4. After successfully following your instructions, the user calls again. This time he is puzzled by error messages that are produced when his users attempt a clean shutdown from multiuser mode using the shutdown command without arguments.

    1. Re-evaluate the manpages in question. Are there any clues to common problems? (Hint: see BUGS.)

    2. State the typical shutdown command to issue from multiuser mode.

 


LPI Linux Certification in a Nutshell
LPI Linux Certification in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596005288
EAN: 2147483647
Year: 2000
Pages: 194

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