系统城装机大师 - 固镇县祥瑞电脑科技销售部宣传站!

当前位置:首页 > 系统教程 > Linux教程 > 详细页面

Linux whatis命令的使用方法

时间:2020-02-19来源:系统城作者:电脑系统城

01. 命令概述

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

02. 命令格式

whatis [OPTION…] 关键词…

03. 常用选项


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

04. 参考示例


 
  1. [deng@localhost ~]$ whatis ls
  2. ls (1) - 列目录内容
  3. ls (1p) - list directory contents
  4.  
  5. [deng@localhost ~]$ whatis cp
  6. cp (1) - 复制文件和目录
  7. cp (1p) - copy files
  8.  
  9. [deng@localhost ~]$ whatis chown
  10. chown (1) - 修改文件所有者和组别
  11. chown (1p) - change the file ownership
  12. chown (2) - change ownership of a file
  13. chown (3p) - change owner and group of a file
  14.  
  15. [deng@localhost ~]$ whatis man
  16. man (1) - 格式化并显示在线帮助手册页
  17. man (7) - 格式化手册页的宏
  18. man (1p) - display system documentation
  19. [deng@localhost ~]$

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


 
  1. [root@localhost ~]# makewhatis

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

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持我们。

分享到:

相关信息

  • linux定时关机设置教程

    当linux在运作时不能直接关闭电源容易将档案系统损毁,因此需要用shutdown以安全的方式关闭,那么这个操作该怎么实现呢?下面就为大家带来了详细教程。...

    2022-11-07

  • linux强制删除文件教程

    由于linux系统和我们常用的windows系统是不一样的,所以如果是初学者,可能会不知道linux怎么强制删除文件,其实我们只要打开终端,使用命令就可以删除了。...

    2022-11-03

系统教程栏目

栏目热门教程

人气教程排行

站长推荐

热门系统下载