Leo Posted October 11, 2003 Report Share Posted October 11, 2003 Here's one for the newbies like me who have trouble with large Man pages (like for mplayer). I am sure I picked this up from somewhere else but cannot remember where (so apologies if it was your idea). Instead of trawling through lengthy man pages simply type at the command line man <man page description>|grep -C <lines to show> <search text> for example man mplayer|grep -C 3 dvd This would return three lines above and below every instance of the string "dvd" in the man pages for mplayer. It will also separate out each block of text with "-------" This has really helped me recently whilst trying to get mplayer to work. Leo Quote Link to comment Share on other sites More sharing options...
aru Posted October 11, 2003 Report Share Posted October 11, 2003 Good tip, but I have a little complaint ;) doing it your way you loose the whole by showing only a few lines of each match. IMHO is better to use the search feature of the man pages viewer: ie press '/' and enter the string to search, then the viewer will move to the next string match. "man man" for more info Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted October 17, 2003 Report Share Posted October 17, 2003 Also very helpful if you don't know what man page to look for: [root@omarserenity tmp]# man man <<snip>> -K Search for the specified string in *all* man pages. Warning: this is probably very slow! It helps to specify a section. (Just to give a rough idea, on my machine this takes about a minute per 500 man pages.) <<snip>> Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted October 17, 2003 Report Share Posted October 17, 2003 Also very helpful if you don't know what man page to look for: [root@omarserenity tmp]# man man <<snip>> -K Search for the specified string in *all* man pages. Warning: this is probably very slow! It helps to specify a section. (Just to give a rough idea, on my machine this takes about a minute per 500 man pages.) <<snip>> As for aru's / method, I don't see that in the manpage, but I could have overlooked it. Any other tricks in there that I don't see? Quote Link to comment Share on other sites More sharing options...
paleo Posted October 17, 2003 Report Share Posted October 17, 2003 why not use konqueror? type man:mplayer for an html formatted version of the mplayer man page. Works with any man page. And it even links to other man pages. You can also use just man: and you can browse through the man pages in konqueror. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.