Enjoy Slackware 15.0!
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
howtos:general_admin:searching_and_reading_manpages_efficiently [2012/11/01 10:31 (UTC)] markush [Searching for a Manpage] formatted commands as monospace |
howtos:general_admin:searching_and_reading_manpages_efficiently [2013/01/07 04:04 (UTC)] mfillpot general formatting cleanup |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <!-- Reviewed 2013-01-06 mfillpot --> | ||
+ | <!-- Reviewed 2012-12-31 hazel --> | ||
<!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> | <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> | ||
- | =====How to search and read Manpages efficiently===== | + | ====== How to search and read Manpages efficiently |
- | I hope this Howto can help some of you, although I'm aware that many of the readers are already familiar with this subject. | + | Manpages are pages in the online Unix Manual. |
+ | some of you to use them more effectively, although I'm aware that many of | ||
+ | the readers are already familiar with this subject. | ||
- | ====Searching for a Manpage==== | + | ===== Searching for a Manpage |
- | In order to search for information about anything in the manpages you can use one of the following commands: | + | In order to search for information about anything in the manpages you can |
+ | use one of the following commands: | ||
* '' | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
- | '' | + | '' |
+ | them. The difference between '' | ||
+ | '' | ||
+ | respectively) searches for parts of strings. | ||
- | If you don't know how exactly a word, for example a command, is written, you can use '' | + | If you don't know how exactly a word, for example a command, is written, you |
+ | can use '' | ||
+ | would be more efficient because it results in fewer lines of output. | ||
- | ===Example=== | + | === Example === |
Searching for information about DHCP: | Searching for information about DHCP: | ||
With the '' | With the '' | ||
< | < | ||
- | markus@samsung:~$ apropos dhcp | + | user@darkstar$ apropos dhcp |
- | dhclient [] (8) - script - DHCP client network configuration script | + | dhclient [] (8) - script - DHCP client network configuration script |
- | dhclient.conf [] | + | dhclient.conf [] |
- | dhclient.leases [] | + | dhclient.leases [] |
- | dhcp [] (5) - eval - ISC DHCP conditional evaluation | + | dhcp [] (5) - eval - ISC DHCP conditional evaluation |
- | dhcp [] (5) - options - Dynamic Host Configuration Protocol options | + | dhcp [] (5) - options - Dynamic Host Configuration Protocol options |
- | dhcpcd [] (8) - an RFC 2131 compliant DHCP client | + | dhcpcd [] (8) - an RFC 2131 compliant DHCP client |
- | dhcpcd [] (8) - run-hooks - DHCP client configuration script | + | dhcpcd [] (8) - run-hooks - DHCP client configuration script |
- | dhcpcd.conf [] | + | dhcpcd.conf [] |
- | dhcpctl_initialize [] (3) - dhcpctl library initialization | + | dhcpctl_initialize [] (3) - dhcpctl library initialization |
- | dhcpctl_initialize [] (3p) - dhcpctl library initialization | + | dhcpctl_initialize [] (3p) - dhcpctl library initialization |
- | dhcpd [] | + | dhcpd [] |
- | dhcpd.conf [] (5) - dhcpd configuration file | + | dhcpd.conf [] (5) - dhcpd configuration file |
- | dhcpd.leases [] (5) - DHCP client lease database | + | dhcpd.leases [] (5) - DHCP client lease database |
dnsmasq [] | dnsmasq [] | ||
</ | </ | ||
With the '' | With the '' | ||
< | < | ||
- | markus@samsung:~$ whatis dhcp | + | user@darkstar$ whatis dhcp |
- | dhcp [] (5) - eval - ISC DHCP conditional evaluation | + | dhcp [] (5) - eval - ISC DHCP conditional evaluation |
- | dhcp [] (5) - options - Dynamic Host Configuration Protocol options | + | dhcp [] (5) - options - Dynamic Host Configuration Protocol options |
</ | </ | ||
- | Both commands search case-insensitive! | + | For both commands, the search |
- | ====Updating the '' | + | ===== Updating the '' |
- | The '' | + | The '' |
+ | the stock Slackware installation are already present in the database. This | ||
+ | is also true if you upgrade such packages. But if you build your own | ||
+ | packages from source, for example from | ||
+ | [[http:// | ||
+ | packages are not yet present in the '' | ||
+ | the database after installing new packages, Slackware provides the | ||
+ | '' | ||
- | Please note that other distributions | + | Please note that some other distributions use the '' |
+ | purpose. | ||
- | ====The Sectioning of the Manpages==== | + | ===== Sections in the Manual ===== |
- | Don't confuse | + | Don't confuse |
+ | manpage; they are described in the paragraph below. | ||
- | The manpages | + | The manpages |
+ | extract from the manpage for the '' | ||
< | < | ||
MANUAL SECTIONS | MANUAL SECTIONS | ||
Line 60: | Line 80: | ||
| | ||
| | ||
- | | + | |
- | | + | |
</ | </ | ||
- | If the manualpages | + | If the manual pages for a topic are divided over different sections, one can |
- | ===Example=== | + | pass the section number as an additional |
+ | === Example === | ||
< | < | ||
- | markus@samsung:~$ apropos man | + | user@darkstar$ apropos man |
... | ... | ||
makecontext [] | makecontext [] | ||
Line 77: | Line 98: | ||
manuals with [] (7) - mdoc | manuals with [] (7) - mdoc | ||
</ | </ | ||
- | Now if you want to read the manpage about " | + | Now if you want to read the manpage about " |
- | < | + | section 7 you'll have to execute the following command: |
+ | < | ||
+ | user@darkstar$ | ||
+ | </ | ||
- | ====The Structure of the Manpages==== | + | ===== The Structure of the Manpages |
- | The manpages have (should have) all the same structure: | + | The manpages |
* Name | * Name | ||
- | * Name of the command and a short description | + | * Name of the command and a short description |
* Synopsis | * Synopsis | ||
- | * A short list of the options | + | * A usage statement including a short list of the options |
* Description | * Description | ||
- | * The detailed explanation of the command | + | * A detailed explanation of the command |
* Options | * Options | ||
- | * Detailed explanation of the commandline-options for the command | + | * Detailed explanation of the command line options for the command |
* Bugs | * Bugs | ||
- | * Known Bugs | + | * Known Bugs |
* Author | * Author | ||
* The author(s) of the package and maybe the author of the manpage | * The author(s) of the package and maybe the author of the manpage | ||
Line 97: | Line 121: | ||
* Advice for manpages about similar or related programs | * Advice for manpages about similar or related programs | ||
- | If one searches for information about a subject rather than a single command the "see also" line is very interesting. | + | If one searches for information about a subject rather than a single |
+ | command the "see also" line is very interesting. | ||
+ | |||
+ | ===== Searching within a Manpage ===== | ||
+ | The reader for the manpages is the program '' | ||
+ | very similar to the vi editor. | ||
+ | |||
+ | * < | ||
+ | * < | ||
+ | * < | ||
+ | |||
+ | The < | ||
+ | possible to search (for example) for the -k option with ///-k// | ||
- | ====Searching within a Manpage==== | ||
- | The reader for the manpages is the program '' | ||
- | With ''/'' | ||
===Example=== | ===Example=== | ||
- | Searching for the -h option in the manpage for the '' | + | Searching for the //-h// option in the manpage for the '' |
- | gives us< | + | //-h// gives us |
- | with -l, print sizes in human readable format (e.g., 1K 234M 2G)</ | + | < |
+ | -h, --human-readable | ||
+ | with -l, print sizes in human readable format (e.g., 1K 234M 2G) | ||
+ | </ | ||
- | ====Navigation within a Manpage==== | + | ===== Navigation within a Manpage |
- | Navigation | + | Navigation |
- | * '' | + | * <key>' |
- | * '' | + | * < |
- | * '' | + | * // |
One can also **set marks** at a line of the manpage | One can also **set marks** at a line of the manpage | ||
- | * '' | + | * //< |
- | * '' 'a'' | + | * //< |
- | Unfortunately these marks are lost when you leave the manpage (which is done with q). | + | Unfortunately these marks are lost when you leave the manpage (which is |
+ | done with <key>q</ | ||
- | ====Formatting a Manpage as a PDF-document==== | + | ===== Formatting a Manpage as a PDF-document |
If you want to have a manpage as a PDF document you can use the command: | If you want to have a manpage as a PDF document you can use the command: | ||
- | < | + | < |
- | which formats the manpage for the '' | + | man -t ls | ps2pdf - > ls-manpage.pdf |
+ | </ | ||
+ | which formats the manpage for the '' | ||
+ | named " | ||
- | ====Further Reading==== | + | ===== Further Reading |
- | For more information read the manpage for the '' | + | For more information read the manpage for the '' |
+ | manpages listed in "see also". | ||
====== Sources ====== | ====== Sources ====== | ||
<!-- If you are copying information from another source, then specify that source --> | <!-- If you are copying information from another source, then specify that source --> | ||
<!-- * Original source: [[http:// | <!-- * Original source: [[http:// | ||
<!-- Authors are allowed to give credit to themselves! --> | <!-- Authors are allowed to give credit to themselves! --> | ||
- | * Originally written by [[wiki: | + | * Originally written by [[wiki: |
<!-- * Contributions by [[wiki: | <!-- * Contributions by [[wiki: | ||
<!-- Please do not modify anything below, except adding new tags.--> | <!-- Please do not modify anything below, except adding new tags.--> | ||
<!-- You must remove the tag-word " | <!-- You must remove the tag-word " | ||
- | {{tag> | + | {{tag> |