LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-15-2012, 11:14 PM   #1
mcswell
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Rep: Reputation: Disabled
man finds it, but man -k or apropos doesn't: why?


I have a man page here:
/groups/tools/texlive/2011/texmf/doc/man/man1/otfinfo.1
The directory is on my $MANPATH, and the 'man' program finds it. That is, if I type
man otfinfo
then I get the man page for otfinfo. But neither 'man -k' nor 'apropos' finds it, i.e.
apropos otfinfo
doesn't work, nor does
apropos font
even though the word "font" appears in the 'NAME' section of that manpage. ('apropos font' finds a ton of other stuff, but not this.)

I thought I'd try explicitly telling 'man -k' where to look:
man -k -M /groups/tools/texlive/2011/texmf/doc/man/man1/ \
otfinfo
but it still doesn't find anything. I tried /usr/bin/apropos with the -M option, but our version of 'apropos' (RedHat distro, unlike the one here: http://www.dsm.fordham.edu/cgi-bin/m...?topic=apropos) doesn't support the -M option.

'file' (and inspection) shows the otfinfo.1 file to be "troff or preprocessor input text." So it's not some funny format.

Why can 'man' find this manpage, but 'man -k' can't?
 
Old 02-15-2012, 11:22 PM   #2
tommylovell
Member
 
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 372

Rep: Reputation: 101Reputation: 101
'apropos' and 'man -k' use a database that is created/updated by 'makewhatis' (or 'mandb' in newer releases).

Usually one of those commands is run from cron periodically to update the database. If the man page in question was newly added to your system, try running 'makewhatis' (or 'mandb') and see if that helps.

Last edited by tommylovell; 02-15-2012 at 11:26 PM.
 
Old 02-16-2012, 08:51 AM   #3
mcswell
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks!

Our system doesn't have mandb, and for some reason makewhatis is not executable by me. I'll check with our IT people about whether that's intentional. In the case of this man file, it's on my $MANPATH, but not the system $MANPATH. So I'll probably also need to get our IT people to add that path.

From what I can tell from the various man pages on 'makewhatis', 'man' etc., the indexes are maintained in global (system) directories. It doesn't look like there's any provision for adding indices under ~, is that correct? I.e. I can't add personal man pages to the index that 'apropos' would find.
 
Old 02-16-2012, 06:16 PM   #4
tommylovell
Member
 
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 372

Rep: Reputation: 101Reputation: 101
Quote:
Originally Posted by mcswell View Post
Our system doesn't have mandb, and for some reason makewhatis is not executable by me. I'll check with our IT people about whether that's intentional.
It's probably intentional. 'mandb' in my case is executable by an non-priivileged user, me, but I apparently don't have access to all the files mandb accesses.
Code:
[tommy@athlon ~]$ whereis mandb
mandb: /usr/bin/mandb /usr/share/man/man8/mandb.8.gz
[tommy@athlon ~]$ ll /usr/bin/mandb
-rwxr-xr-x. 1 root root 117112 Jun 17  2011 /usr/bin/mandb
[tommy@athlon ~]$ mandb
Purging old database entries in /usr/share/man...
Processing manual pages under /usr/share/man...
fopen: Permission denied
[tommy@athlon ~]$
Quote:
In the case of this man file, it's on my $MANPATH, but not the system $MANPATH. So I'll probably also need to get our IT people to add that path.
Or they may prefer to copy it into their own protected directory...

Quote:
It doesn't look like there's any provision for adding indices under ~, is that correct? I.e. I can't add personal man pages to the index that 'apropos' would find.
That's correct. It's pretty much up to your system admins to add your man pages in if they decide that's appropriate...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
man page is not found although $MANPATH and man.conf changed Abbraxas Linux - Newbie 3 09-05-2011 07:40 PM
Please Help Me Use The Man/Info/Apropos Pages abcool92 Linux - General 10 03-28-2010 05:59 AM
LXer: Ubuntu man finds metalove in Debian attacks LXer Syndicated Linux News 0 10-06-2009 01:50 AM
apropos, man -k, man -f? krishvij Linux - Newbie 5 06-06-2005 02:42 PM
'apropos' and 'whatis' not returning info when 'man' does docbrazen Slackware 2 11-16-2003 12:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration