Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Actually...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Actually...
Authored by: serversurfer on Apr 18, '02 07:40:31AM
'apropos' and 'man -k' both use the whatis database. man also give you the option of limiting your search to certain sections of the man entries.
1. User Commands
2. System Calls
3. Library Calls
4. Special Files
5. File Formats
6. Games (not much there, unfortunately)
7. Macros and Conventions
8. Administrative Commands
9. Kernel Interface
This is especially useful for getting at the deeper entries (try 'man passwd', then 'man 5 passwd'), but it is also relevant to this discussion. man allows you to search multiple sections with the -S flag, and there are "commands you can use" in section 8 as well, (if you can sudo, that is). Oh well. Now that I am trying to test this, I discover that the section limit doesn't work with the -k option. I was trying to save you guys a grep. Nevermind. :( Just don't forget about section 8, that's where all the "hardcore" (fun) stuff is. (5 is pretty useful for figuring out config files and such.) Anyway try this alias:
alias apro 'apropos !* | grep -E "(1)|(5)|(8)"'
That will get you info from all the "good" sections. If you REALLY want to search the mans, GNU man has -K (that's capital 'K'). This searches through the full text of each man page to match your search string! (not just the description headers) Keep in mind, this will take a VERY long time. Love, The Surfer

[ Reply to This | # ]