About Linux FAQ

Browse More FAQs:

Search all the Linux man pages for a particular command or text

Posted by Vivek Gite [Last updated: January 26, 2007]

Q. Under KDE I get nice facility to search all man pages for particular command or phrase. I am login to remote server over ssh. How do I search all the man pages for a particular command at Linux shell prompt?

A. You need to use man command with -K option or use apropos command.

apropos command

The apropos command searches a set of database files containing short descriptions of system commands for keywords and displays the result on the standard output.
Syntax:
apropos oneword
apropos "string or phrase"

Search command / functions related to compare operation:
$ apropos compare

Search command to remove a file:
$ apropos "remove file"
Output:

rm                   (1)  - remove files or directorie

man -K

-K option use to search for the specified string in all man pages.
Syntax:
man -K oneword
man -K "string or phrase"

Search all man pages for fopen word:
$ man -K "fopen"
Output:

/usr/share/man/en/man3/fclose.3.gz? [ynq]   

Type y to open/display man page, n to continue search, q to Quit search.

This is probably very slow! It helps to specify a section (1-7).
$ man 3 -K "open"

Above commands also works with UNIX and *BSD oses.

E-mail this to a friend      Printable version

Related Other Helpful FAQs:

Discussion on This FAQ

  1. vengadesh Says:

    search paricular month alone using find command in linux

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.