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.

man -a <xyz> opens all the man pages one by one which contain xyz.
On my unix servers man -a <xyz> doesn't work.
Is there any alternative for this on unix?

EDIT:

I am on HP-UX. Following message :

hemantj [109]> man -a printf
Usage: man [-M path] [-T macro-package] [ section ] name ...
or: man -k keyword ...
or: man -f file ...
share|improve this question
2  
Why man -a doesn't work? Install a proper version of man. Try to debug it: strace man -a term 2> strace.out and echo $LANG Try to add your user to the man group. –  dZkF9RWJT6wN8ux Aug 18 '10 at 16:03
    
What Unix are you exactly using: Solaris, HP-UX, AIX, *BSD? Also what does it mean "doesn't work": the -a option isn't recognized and man doesn't show anything or man shows only the first page? One more thing: could you give examples of <xyz> just to be sure that there are multiple sections on that subject? –  Cristian Ciupitu Sep 1 '10 at 2:26
    
@cristian: I just updated my original question. –  Hemant Sep 10 '10 at 11:22
    
what happens when you run man printf? –  Cristian Ciupitu Sep 10 '10 at 17:46
    
@Cristian: man printf opens man page for printf(1) –  Hemant Sep 12 '10 at 8:25

3 Answers 3

up vote 4 down vote accepted

Does man -k work? If so, then:

man -k "$@" | cut -f1 -d' ' | xargs man

might do what you want

share|improve this answer

There are always emcas-based info pages:

$ info --apropos=man
$ info --apropos=info
share|improve this answer
1  
Not necessarily (the Unix in question is HP-UX). Haven't used HP-UX since the late 90s so I don't have one handy, but GNU-based tools like info(1) aren't globally available unless we're talking about Linux. They certainly weren't available on SunOS and Solaris, and still aren't. You have to install the GNU tools separately, often by compiling them. –  Alexios Jan 24 '12 at 1:42

Is apropos available on the system? It can be used to search for man pages.

With a quick one-liner, it can come close to the man -a behaviour

man `apropos -el apt | awk -F")" '{print $1}' | awk -F"(" '{print $2, $1}'`
share|improve this answer
    
Thanks for reply. But apropos not available. –  Hemant Aug 18 '10 at 13:24
1  
apropos is functionally identical to (and usually implemented using) man -k. –  Alexios Jan 24 '12 at 1:36

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.