Closed gngrossi closed 1 year ago
@gngrossi Both whatis
andapropos
require that you run mandb
on the GNU man pages to generate an index.
After you've done this, you can see one-liners for matching man pages for whatis. For example: whatis iconv
should print out:
You should see a raw text match of headers with apropos, e.g. apropos iconv
should print out:
Simplest way to get all the GNU man pages set up is:
cd ~/zopen/boot
mandb .
cd ~/zopen/prod
mandb .
This will setup indexes for your 'prod' and 'boot' tools
bash-5.2$ man --version man 2.10.2
bash-5.2$ whatis apropos apropos (1) - search the manual page names and descriptions
bash-5.2$ whatis iconv iconv (1) - character set conversion iconv (3) - perform character set conversion
bash-5.2$ whatis vim vim (1) - Vi IMproved, a programmer's text editor
ok - what looks right to me. Any concerns or can we close?
Does this look OK for the mandb output? thanks
mandb: warning: $MANPATH set, ignoring /u/jenkins/zopen/prod/man-db-2.10.2/etc/man_db.conf mandb: warning: no MANDB_MAP directives in /u/jenkins/zopen/prod/man-db-2.10.2/etc/man_db.conf, using your manpath
EDC5129I No such file or directory. mandb: warning:
Processing manual pages under /hewitt/coz/current/doc/man... mandb: can't update index cache /hewitt/coz/current/doc/man/84546389: EDC5129I No such file or directory. Updating index cache for path `/hewitt/coz/current/doc/man/man5'. Wait...done. Checking for stray cats under /hewitt/coz/current/doc/man... Processing manual pages under /hewitt/coz/current/doc/man/cat1... mandb: can't update index cache /hewitt/coz/current/doc/man/cat1/84546389: EDC5129I No such file or directory. Processing manual pages under /hewitt/coz/current/doc/man/cat5... mandb: can't update index cache /hewitt/coz/current/doc/man/cat5/84546389: EDC5129I No such file or directory.
Processing manual pages under /usr/lpp/ported/man/C... mandb: warning: cannot create catdir /usr/lpp/ported/man/C/cat1
Removing obsolete cat directory /hewitt/coz/current/doc/man/cat1/catsearch.1...
73 man subdirectories contained newer manual pages. 5746 manual pages were added. 0 stray cats were added. 0 old database entries were purged.
Yes – that’s similar to what I see. Did you say ‘mandb .’ or just ‘mandb’ ? If just mandb, it is probably using your MANPATH to update indexes and when it tries to look at the system ‘man’, it doesn’t have update access to it (which is good!)
I ran: bash-5.2$ pwd /hewitt/zopentools/guild
then mandb
Should I run mandb . instead?
Also, the update below, was that OK?
Processing manual pages under /hewitt/coz/current/doc/man... mandb: can't update index cache /hewitt/coz/current/doc/man/84546389: EDC5129I No such file or directory. Updating index cache for path `/hewitt/coz/current/doc/man/man5'. Wait...done. Checking for stray cats under /hewitt/coz/current/doc/man... Processing manual pages under /hewitt/coz/current/doc/man/cat1... mandb: can't update index cache /hewitt/coz/current/doc/man/cat1/84546389: EDC5129I No such file or directory. Processing manual pages under /hewitt/coz/current/doc/man/cat5... mandb: can't update index cache /hewitt/coz/current/doc/man/cat5/84546389: EDC5129I No such file or directory.
Removing obsolete cat directory /hewitt/coz/current/doc/man/cat1/catsearch.1...
bash-5.2$ pwd /hewitt/zopentools/guild
bash-5.2$ mandb . mandb_output2.txt
ok. so... i guess i shouldn't just punt on those messages - i was thinking it was 'working as designed' but i haven't validated that (i.e. the cache messages are 'ok'). Can you change the title to 'validate messages from mandb .
' or something like that since I think 'whatis' is ok, but perhaps mandb isn't ?
Closing issue and opening a new issue "Validate messages from mandb".
Not sure what to expect... thanks
output from a Linux on Z RHEL 7.x server
$ whatis ls ls (1p) - list directory contents ls (1) - list directory contents
output from an x86 RHEL 8.x server
$ whatis ls ls: nothing appropriate.
--
RC=(0) [SYSA] bash-5.2$ which whatis /hewitt/zopentools/guild/man-db-2.10.2/bin/whatis
RC=(0) [SYSA] bash-5.2$ whatis ls ls: nothing appropriate.
RC=(16) [SYSA] bash-5.2$ whatis --version whatis 2.10.2
RC=(0) [SYSA] bash-5.2$ whatis --help Usage: whatis [OPTION...] KEYWORD...
-d, --debug emit debugging messages -v, --verbose print verbose warning messages -r, --regex interpret each keyword as a regex -w, --wildcard the keyword(s) contain wildcards -l, --long do not trim output to terminal width -C, --config-file=FILE use this user configuration file -L, --locale=LOCALE define the locale for this search -m, --systems=SYSTEM use manual pages from other systems -M, --manpath=PATH set search path for manual pages to PATH -s, --sections=LIST, --section=LIST search only these sections (colon-separated) -?, --help give this help list --usage give a short usage message -V, --version print program version
Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. Report bugs to cjwatson@debian.org.