由于某种奇怪的原因,我的Unix shell(cygwin)中的“whatis”命令无法正常工作。 它不断返回“ls:nothing appropriate”或“cd:nothing appropriate”。 我想知道是否有一些设置出现错误。 有没有人可以提供帮助?谢谢!
我在使用64位Red Hat Cygwin安装时遇到了类似的问题。
在我的情况下,/usr/sbin/makewhatis
不存在。 运行man
和一个命令可以工作,但apropos
和whatis
都没有返回除“无适当内容”之外的任何信息。
在寻找缺失的包并搜索一些信息后,我阅读了man
页面上友好的手册,并发现了mandb
。
运行mandb
解决了我的问题。
makewhatis
,但是mandb
可以工作!感谢您的建议 :) - legends2k来自于Cygwin FAQ:
为什么 man -k (或 apropos) 不起作用?
在使用 man -k 或 apropos 之前,您必须创建 whatis 数据库。只需要运行以下命令:
mandb
(注意: 在早期版本的FAQ中,它使用的是
/usr/sbin/makewhatis
而不是mandb
。)
man
打开手册页面。apropos
和 whatis
搜索索引以查找相关的手册页面。尝试运行 man man
、man apropos
和 man whatis
以获取有关它们各自功能的更多详细信息,如果您仍然遇到问题,请随时提出新问题。 - me_andsudo
运行它才能更新。 - Sharpiro执行一次sudo mandb
不确定是否有所帮助,但是当我运行 mandb
时,多次尝试都得到了这个结果。
mandb
0 man subdirectories contained newer manual pages.
0 manual pages were added.
0 stray cats were added.
0 old database entries were purged.
然而,
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.
实际运作。
我遇到了同样的问题。
我使用#mandb
命令解决了它。
sudo mandb 对我解决了这个问题。它重新生成了 apropos 数据库,但你必须确保使用 sudo 运行它。
我的问题通过运行 #mandb 命令得到了解决。
[root@localhost log]# whatis last
last (1) - show a listing of last logged in users
[root@localhost log]#
type whatis
的输出是什么? - Deqing