< Day Day Up > |
1.2.1 ProblemYou're trying to use some programs (for example, everyone's favorite, grep; the name tells you so much) and you can't make them them do what you want. So, heeding the standard "RTFM" (read the fine man page) advice, you dig up the relevant man pages. But they don't make a lot of sense now what? 1.2.2 SolutionLearn how man pages are organized, and familiarize yourself with their conventions for teaching command syntax and options, and you'll find that man pages really are helpful. 1.2.3 DiscussionLinux sees all the man pages on a system as part of a single manual. This manual is divided into sections:
Each individual program, utility, or function has its own page in this manual, like a page in a book. Finding the man page for a program or command is usually as easy as typing man foo, where foo is the name of the program. You've probably seen references to numbered man pages, like grep(1). This is referring to man grep in section 1. Call it up this way: $ man 1 grep Some man pages are in more than one section. man foo will only display the first one. You can list all of them with the -f switch: $ man -f man man (1) an interface to the online reference manuals man (7) macros to format man pages Each man page is divided into sections. The section names vary, but you'll usually see these: NAME, SYNOPSIS, DESCRIPTION, OPTIONS, FILES, EXAMPLES, SEE ALSO, BUGS, and AUTHOR. Here's the notation used to show command syntax, found in the Synopsis of the man pages: command-name [optional flags] any-other-required-elements Command flags are shown this way:
Short options can be typed two ways: -abc or: -a -b -c Long options must be individually hyphenated, and they use double hyphens: --option1 --option2 --option3 Long options are especially useful in scripts, so you can remember what the script does. The bulk of most man pages is a list of the options available. 1.2.4 See Also
|
< Day Day Up > |