
当尝试使用whatis ls时,提示:ls:nothing appropriate 。
[root@haojin ~]# whatis man
man: nothing appropriate.
[root@haojin ~]# whatis ls
ls: nothing appropriate.
[root@haojin ~]# whatis wc
wc: nothing appropriate.
如下图
问度娘才知道,原来whatis是根据数据库执行查找操作的,这个数据库是定期更新的,新安装的系统,系统还未自动更新,所以可以使用makewhatis手动更新,再次运行whatis ls,可以成功使用了。要有root权限才能使用makewhatis.
[root@haojin ~]# makewhatis
bash: makewhatis: command
Install package 'mandoc' to provide command 'makewhatis'? [N/y] y* Waiting * Loading list
The following packages have to be installed:mandoc-1.14.5-12.el8.x86_64 A suite of tools for compiling mdoc and man
Proceed with changes? [N/y] y* Waiting * Waiting * Waiting * Loading list * * Failed to install packages: Error running transaction: file /usr/share/man/man7/ from install of mandoc-1.14.5-12.el8.x86_64 conflicts with file from package man-pages-4.15-6.el8.x86_64
[root@haojin ~]# whereis makewhatis
makewhatis:
[root@haojin ~]# whereis whatis
whatis: /usr/bin/whatis /usr/share/man/man1/[root@haojin ~]# whatis ls
ls (1) - list directory contents
ls (1p) - list directory contents
[root@haojin ~]# whatis file
file (1) - determine file type
file (1p) - determine file type
[root@haojin ~]# whatis wc
wc (1) - print newline, word, and byte counts for each file
wc (1p) - word, line, and byte or character count
本文发布于:2024-03-05 17:42:46,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/1709702635124120.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
| 留言与评论(共有 0 条评论) |