Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How do I search man pages for options? I currently do this:

/-<option>

Example:

To see what grep -i does, I do this:

man grep and then /-i.

Or, I can do this:

man grep | grep .-i

Is there a better way of searching man pages for options?

share|improve this question
1  
Not really, but you could make an alias for man | less -p <PATTERN> like unix.stackexchange.com/questions/18087/… –  Mikel Dec 11 '12 at 3:12

1 Answer 1

You can redirect the man output to gedit and then use "ctrl+F" to find whatever you want to.

man grep | gedit

which will show you man page of grep in a gedit window. Use find option. :)

share|improve this answer
1  
How is this remotely better than using grep! –  Cohen K Dec 12 '12 at 4:55
    
@CohenK gedit gives you find (ctrl+f) option where you can place search items exactly the way you want. You will not have to remember regex way of searching it or piping it through less/more/grep etc. I would not claim it as "better" way than using grep, but rather I would say this is another work around. Choices may differ :) . –  Chandan Gupta Dec 12 '12 at 8:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.