Unix (Cygwin) whatis: returns all commands as "nothing appropriate"
Asked Answered
H

6

16

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!

Haematogenous answered 2/8, 2012 at 9:2 Comment(2)
What is output of type whatis?Hight
It says "whatis is hashed (usr/bin/whatis).Haematogenous
L
14

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.)

Lammastide answered 2/8, 2012 at 16:58 Comment(2)
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
On Fedora, I had to run this as sudo for it to updateOwlet
P
30

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.

Pother answered 10/9, 2014 at 20:10 Comment(2)
+1 In MSYS2 too there wasn't a makewhatis, but mandb worked! Thanks for your suggestion :)Liss
This answer also applies to vanilla 64-bit Cygwin.Orthorhombic
L
14

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.)

Lammastide answered 2/8, 2012 at 16:58 Comment(2)
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
On Fedora, I had to run this as sudo for it to updateOwlet
H
11

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.

Huba answered 28/5, 2020 at 7:56 Comment(0)
G
0

I faced the same issue.
I fixed it by #mandb command.

Gallman answered 2/4, 2020 at 6:24 Comment(0)
T
0

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]#
Tigges answered 30/6, 2020 at 13:21 Comment(0)
I
0

sudo mandb solved the problem for me. It regenerates the apropos database, but you have to make sure you run it with sudo.

Idiolect answered 24/10, 2022 at 12:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.