For some odd reason, the "whatis" command in my Unix shell (cygwin) is not working. It constantly returns "ls: nothing appropriate" or "cd: nothing appropriate". I'm wondering if there is something incorrectly set-up. Does anyone have any light to shed? Thanks!
From the Cygwin FAQ:
Why doesn't man -k (or apropos) work?
Before you can use man -k or apropos, you must create the whatis database. Just run the command
mandb
(it may take a minute to complete).
(Note: It used to say /usr/sbin/makewhatis
instead of mandb
in older versions of that FAQ.)
man
opens manual pages. apropos
and whatis
search an index for relevant manual pages. Try running man man
, man apropos
and man whatis
for more details on what each of them do, and feel free to ask a new question if you're still stuck. –
Lammastide sudo
for it to update –
Owlet I ran into a similar issue using the 64-bit Red Hat Cygwin installation.
In my case, /usr/sbin/makewhatis
did not exist. Running man
and a command worked, but neither apropos
nor whatis
returned anything other than "nothing appropriate".
After searching for a missing package and binging a bunch, I Read The Friendly Manual page for man
and found out about mandb
.
Running mandb
solved my problem.
makewhatis
, but mandb
worked! Thanks for your suggestion :) –
Liss From the Cygwin FAQ:
Why doesn't man -k (or apropos) work?
Before you can use man -k or apropos, you must create the whatis database. Just run the command
mandb
(it may take a minute to complete).
(Note: It used to say /usr/sbin/makewhatis
instead of mandb
in older versions of that FAQ.)
man
opens manual pages. apropos
and whatis
search an index for relevant manual pages. Try running man man
, man apropos
and man whatis
for more details on what each of them do, and feel free to ask a new question if you're still stuck. –
Lammastide sudo
for it to update –
Owlet Run sudo mandb
once
Not sure if this helps, but when I ran mandb
, I got this (over several attempts).
mandb
0 man subdirectories contained newer manual pages.
0 manual pages were added.
0 stray cats were added.
0 old database entries were purged.
However,
sudo mandb
75 man subdirectories contained newer manual pages.
7235 manual pages were added.
0 stray cats were added.
0 old database entries were purged.
worked for real.
My problem was fixed by running #mandb command
[root@localhost log]# whatis last
last (1) - show a listing of last logged in users
[root@localhost log]#
sudo mandb solved the problem for me. It regenerates the apropos database, but you have to make sure you run it with sudo.
© 2022 - 2024 — McMap. All rights reserved.
type whatis
? – Hight