【Linux】一步一步学Linux——whatis命令(14)
发布日期:2021-06-29 20:59:14 浏览次数:2 分类:技术文章

本文共 1515 字,大约阅读时间需要 5 分钟。

00. 目录

文章目录

01. 命令概述

whatis命令在一些特定的包含系统命令的简短描述的数据库文件里查找关键字,然后把结果送到标准输出。 查找的内容必须完全匹配关键字的才会输出。whatis数据库文件是用/usr/sbin/makewhatis 命令建立的。

02. 命令格式

whatis [OPTION…] 关键词…

03. 常用选项

Usage: whatis [OPTION...] 关键词...  -d, --debug                输出调试信息  -v, --verbose              输出详细的警告信息  -r, --regex                把每个关键词都当作正则表达式解读  -w, --wildcard             关键词里包含通配符  -l, --long                 不要把输出按终端宽度截断  -C, --config-file=文件   使用该用户设置文件  -L, --locale=区域        定义本次搜索所使用的区域设置  -m, --systems=系统       use manual pages from other systems  -M, --manpath=路径       设置搜索手册页的路径为“路径”  -s, --sections=列表, --section=列表                             search only these sections (colon-separated)  -?, --help                 give this help list      --usage                give a short usage message  -V, --version              print program version

04. 参考示例

[deng@localhost ~]$ whatis  lsls (1)               - 列目录内容ls (1p)              - list directory contents[deng@localhost ~]$ whatis cpcp (1)               - 复制文件和目录cp (1p)              - copy files[deng@localhost ~]$ whatis chownchown (1)            - 修改文件所有者和组别chown (1p)           - change the file ownershipchown (2)            - change ownership of a filechown (3p)           - change owner and group of a file[deng@localhost ~]$ whatis manman (1)              - 格式化并显示在线帮助手册页man (7)              - 格式化手册页的宏man (1p)             - display system documentation[deng@localhost ~]$

如果需要重建这个命令相关信息的数据库,执行以下命令:

[root@localhost ~]# makewhatis

注意:Centos7.5暂时不支持该命令。

05. 附录

参考:

转载地址:https://dengjin.blog.csdn.net/article/details/95239198 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:【Linux】一步一步学Linux——whereis命令(15)
下一篇:【Linux】一步一步学Linux——man命令(有问题找男人)(13)

发表评论

最新留言

表示我来过!
[***.240.166.169]2024年04月26日 05时01分43秒