Section 22.4. Documentation (Topic 1.108)


22.4. Documentation (Topic 1.108)

22.4.1. Review Questions

  1. Describe the PAGER environment variable.

    1. How does it affect the man facility?

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

    3. 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. Name the program that displays GNU texinfo pages.

22.4.2. Exercises

22.4.2.1. Exercise 1.108-1. man and /usr/doc

  1. Run a man inquiry as follows:

     $ man -a -Pless mkfifo 

    There are both an mkfifo command and an 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 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?

  3. Now examine the man configuration file:

     $ less /etc/man.config 

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

22.4.2.2. Exercise 1.108-4. Acting as a Linux helpdesk

Suppose you are a help desk technician in a mixed-systems office, and you are relatively new to Linux. A user calls your help desk 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-Delete key combination on his system console, which causes his Linux server to reboot. 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-Delete 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-Delete 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. Reevaluate 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: 2004
Pages: 257

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