Linux/Mac Os X: how to find the appropriate man page
 
26/11/2005 - 14:15 (Category: Linux/Mac Os X)

The *nix man command is the most useful *nix command for any user. You can use it on Linux, Unix and Mac Os X OSes (of course, Mac Os X is a Unix based OS). The man command provides information on almost any command but, what if you can't find the appropriate man page? You can use a couple of man-related commands such as 'whatis', 'apropos' or 'man -k'. When these commands fail, you can perform a search for keywords.
Just as an example, a search for 'sudoers' with whatis (whatis sudoers) returns:

sudoers(5) - list of which users may execute what

here the same search with apropos (apropos sudoers):

sudoers(5) - list of which users may execute what
visudo(8) - edit the sudoers file

here the same search with man -k (man -k sudoers):

sudoers(5) - list of which users may execute what
visudo(8) - edit the sudoers file

if everything fails, you can use the grep command:

grep -l -i sudoers /usr/share/man/*/*

or

grep -l -i sudoers /usr/man/*/*

according to your OS/Linux distribution. The previous command returns:

/usr/share/man/man5/sudoers.5
/usr/share/man/man8/sudo.8
/usr/share/man/man8/visudo.8

notice that now you get the sudo man page too, so you can finally type:

man sudo

Go back

DISCLAIMER:
Any named products on this website are copyright © and/or trademarks ® of their respective companies. INFORMATION ON THIS WEB SITE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. The material included in this site has been compiled from a variety of sources and the site may include technical inaccuracies or typographical errors. Information may be changed or updated without notice. While every effort is made to ensure the correctness of the information provided here, the author can accept no responsibility for damages caused directly or indirectly from the use of such information. The author will not be responsible for damage or loss of data. You are advised to backup data regularly! By entering this site you are agreeing to this and also to never suing the author.

 

Home  About  Mail us!  

Copyright © 1998-2006 Wowarea