Enjoy Slackware 15.0!

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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:28 (UTC)]
markush [Navigation within a Manpage] Formatted the commands as monospace
howtos:general_admin:searching_and_reading_manpages_efficiently [2013/01/06 00:13 (UTC)]
mfillpot added REVIEWED comment
Line 1: Line 1:
 +<!-- 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. I hope this Howto can help 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:
-  * apropos +  * ''apropos'' 
-  * man -k +  * ''man -k'' 
-  * whatis +  * ''whatis'' 
-''apropos'' is only an alias for "man -kthere is no difference between them. The difference between ''whatis'' and the other commands is that ''whatis'' searches for whole words whereas ''apropos'' (or man -k respectively) searches for parts of strings. +''apropos'' is only an alias for ''man -k''; there is no difference between them. The difference between ''whatis'' and the other commands is that ''whatis'' searches for whole words whereas ''apropos'' (or ''man -k'' respectively) searches for parts of strings. 
  
 If you don't know how exactly a word, for example a command, is written, you can use ''apropos''. If you know exactly the word to search for, ''whatis'' would be more efficient because it results in fewer lines of output. If you don't know how exactly a word, for example a command, is written, you can use ''apropos''. If you know exactly the word to search for, ''whatis'' would be more efficient because it results in fewer lines of output.
  
-===Example===+=== Example ===
 Searching for information about DHCP: Searching for information about DHCP:
  
Line 40: Line 41:
 dhcp []              (5)  - options - Dynamic Host Configuration Protocol options  dhcp []              (5)  - options - Dynamic Host Configuration Protocol options 
 </code> </code>
-Both commands search case-insensitive!+For both commands, the search is case-insensitive!
  
-====Updating the ''whatis'' Database==== +===== Updating the ''whatis'' Database ===== 
-The ''whatis''command has its own database. The manpages for any packages of 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://www.slackbuilds.org|SlackBuilds.org]], the manpages of this packages are not yet present in the ''whatis'' database. In order to update the database after installing new packages Slackware provides the ''makewhatis'' command. It has to be executed as root.+The ''whatis''command has its own database. The manpages for any packages of 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://www.slackbuilds.org|SlackBuilds.org]], the manpages for these packages are not yet present in the ''whatis'' database. In order to update the database after installing new packagesSlackware provides the ''makewhatis'' command. It has to be executed as root.
  
-Please note that other distributions possibly use the ''mandb'' command which does the same.+Please note that some other distributions use the ''mandb'' command for this purpose.
  
-====The Sectioning of the Manpages==== +===== Sections in the Manual ===== 
-Don't confuse the sectioning of the manpages with the uniform structure of each manpage, this is described in the paragraph below.+Don't confuse these sections with the sections within the structure of each manpage; they are described in the paragraph below.
  
-The manpages are divided into eight different sections. Here is an extract from the manpage for the ''man'' command.+The manpages manual is divided into eight different sections. Here is an extract from the manpage for the ''man'' command.
 <code> <code>
 MANUAL SECTIONS  MANUAL SECTIONS 
Line 60: Line 61:
             File Formats and Conventions              File Formats and Conventions 
             Games et. Al.              Games et. Al. 
-            Miscellanea  +            Miscellanea 
-            System Administration tools and Deamons+            System Administration tools and Daemons
 </code> </code>
-If the manualpages for a topic are divided over different sections, one can pass the section number as an argument to the ''man'' command. +If the manual pages for a topic are divided over different sections, one can pass the section number as an additional argument to the ''man'' command. 
-===Example===+=== Example ===
 <code> <code>
 markus@samsung:~$ apropos man   markus@samsung:~$ apropos man  
Line 80: Line 81:
 <code>man 7 man</code> <code>man 7 man</code>
  
-====The Structure of the Manpages==== +===== The Structure of the Manpages ===== 
-The manpages have (should have) all the same structure:+The manpages all have (or should have) the same structure:
   * Name   * Name
-    * Name of the command and a short description about it'function(s)+    * Name of the command and a short description of its function(s)
   * Synopsis   * Synopsis
-    * A short list of the options and the synopsis+    * A usage statement including a short list of the options
   * Description   * Description
-    * The detailed explanation of the command +    * 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  
Line 99: Line 100:
 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====+===== Searching within a Manpage =====
 The reader for the manpages is the program ''less''. Its keybindings are very similar to the vi editor. The reader for the manpages is the program ''less''. Its keybindings are very similar to the vi editor.
 With ''/'' one searches the document forward, with ''?'' backwards. With ''n'' the cursor jumps to the next match. The ''-'' key has no special meaning in the search patterns, so it is possible to search (for example) for the -k option with /-k With ''/'' one searches the document forward, with ''?'' backwards. With ''n'' the cursor jumps to the next match. The ''-'' key has no special meaning in the search patterns, so it is possible to search (for example) for the -k option with /-k
Line 107: Line 108:
               with -l, print sizes in human readable format (e.g., 1K 234M 2G)</code>               with -l, print sizes in human readable format (e.g., 1K 234M 2G)</code>
  
-====Navigation within a Manpage==== +===== Navigation within a Manpage ===== 
-Navigation is like in vi: +Navigation commands are like those in vi: 
   * ''G'' end of the manpage    * ''G'' end of the manpage 
   * ''gg'' first line of the mapage   * ''gg'' first line of the mapage
Line 118: Line 119:
 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 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:
-<code>man -t ls | ps2pdf ->ls-manpage.pdf</code>+<code>man -t ls | ps2pdf - > ls-manpage.pdf</code>
 which formats the manpage for the ''ls'' command into a pdf document named "ls-manpage.pdf". which formats the manpage for the ''ls'' command into a pdf document named "ls-manpage.pdf".
  
-====Further Reading==== +===== Further Reading ===== 
-For more information read the manpage for the ''man'' command and read the manpages listed in "see also".+For more information read the manpage for the ''man'' command and 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://some.website.org/some/page.html]] --> <!-- * Original source: [[http://some.website.org/some/page.html]] -->
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
-  * Originally written by [[wiki:user:markush ]]+  * Originally written by [[wiki:user:markush|Markus Hutmacher]] 
 <!-- * Contributions by [[wiki:user:markush]] --> <!-- * Contributions by [[wiki:user:markush]] -->
  
 <!-- 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 "template" below before saving your new page --> <!-- You must remove the tag-word "template" below before saving your new page -->
-{{tag>howtos manpages searching documentation information }}+{{tag>howtos manpages searching documentation information author_markush }}

In Other Languages
QR Code
QR Code howtos:general_admin:searching_and_reading_manpages_efficiently (generated for current page)