07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Man pages not only document programs accessible from the command line, but also configuration<br />

files, system calls, C library functions, and so forth. Sometimes names can collide. For<br />

example, the shell's read command has the same name as the system call read. This is why<br />

manual pages are organized in numbered sections:<br />

1. commands that can be executed from the command line;<br />

2. system calls (functions provided by the kernel);<br />

3. library functions (provided by system libraries);<br />

4. devices (under Unix, these are special files, usually placed in the /dev/ directory);<br />

5. config files (formats and conventions);<br />

6. games;<br />

7. sets of macros and standards;<br />

8. system administration commands;<br />

9. kernel routines.<br />

It is possible to specify the section of the manual page that you are looking for: to view the documentation<br />

for the read system call, you would type man 2 read. When no section is explicitly<br />

specified, the first section that has a manual page with the requested name will be shown. Thus,<br />

man shadow returns shadow(5) because there are no manual pages for shadow in sections 1 to 4.<br />

TIP<br />

whatis<br />

If you do not want to look at the full manual page, but only a short description<br />

to confirm that it is what you are looking for, simply enter whatis command.<br />

$ whatis scp<br />

scp (1)<br />

- secure copy (remote file copy program)<br />

This short description is included in the NAME section at the beginning of all<br />

manual pages.<br />

Of course, if you do not know the names of the commands, the manual is not going to be of much<br />

use to you. This is the purpose of the apropos command, which helps you conduct a search in<br />

the manual pages, or more specifically in their short descriptions. Each manual page begins<br />

essentially with a one line summary. apropos returns a list of manual pages that mention the<br />

keyword(s) requested. If you choose them well, you will find the name of the command that<br />

you need.<br />

Chapter 7 — Solving Problems and Finding Relevant Information<br />

133

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!