Linux - Man Pages
Historically the online Unix manual was divided into eight sections:
1. Commands
2. System Calls
3. Library Functions
4. Special Files
5. File Formats
6. Games
7. Miscellaneous Information
8. System Administration
The man (manual) command can be used in *nix to get help on many commands. For example, type man cd to display the "man page" for the cd command. Typing man kill would display information on the kill command from section 1 of the manual. However, if there is also information about "kill" in section 2, one could type man 2 kill to display that entry (on some systems you may have to enter man -s 2 kill instead).
When reading man pages you may see a command or phrase followed by a number in parentheses, such as chmod(2). This tells you that man information about chmod can be found in section 2. Man output is displayed with less so you can use the Page Up and Page Down keys to scroll through the manual page (or use the b and f keys; b for backward; f for forward). Hit q to get out of less.
Reading a Man Page
Man pages can be difficult to read sometimes because of the complexity of the commands and the various options and arguments. Nonetheless, if you really want to become a proficient *nix user, you will have to learn how to read them. There is no standard format for a man page, but many of them are organized in a a similar format:
|
Section |
Description |
|
Name |
name and purpose of the command |
|
Synopsis |
syntax of the command; shows whether it accepts options or args |
|
Description |
full description of the command; may be quite lengthy (e.g., bash) |
|
Environment |
environment variables used by the command |
|
Author |
the person or persons who wrote the program |
|
Files |
list of important files to this command |
|
Copyright |
who holds the copyright to the program |
|
See Also |
where to look for related information |
|
Diagnostics |
possible errors and warnings |
|
Bugs |
known mistakes or shortcomings |
Previous - Commands, Arguments, and Options | Next - Viewing the Current Directory 'pwd' and 'ls'
No comments:
Post a Comment