apropos命令_Linux apropos 命令用法详解:在 whatis 数据库中查找字符串
2018-10-16 13:55
2531 查看
apropos命令在一些特定的包含系统命令的简短描述的数据库文件里查找关键字,然后把结果送到标准输出。
如果你不知道完成某个特定任务所需要命令的名称,可以使用一个关键字通过Linux apropos实用程序来搜索它。该实用程序可以搜索关键字并且显示所有包含匹配项的man页面的简短描述。另外,使用man实用程序和-k(关键字)选项,可以得到和用Linux apropos实用程序相同的结果(实际上是相同的命令)。
语法
apropos [-dalhvV] [-e|-w|-r] [-s section] [-m system[,...]] [-M path] [-L locale] [-C file] keyword ...
选项
-d, --debug:输出调试信息。 -v, --verbose:输出详细的警告信息。 -r, -- regex:将每个keyword作为正则表达式解释。这是默认行为。每个keyword将匹配手册页和描述。 -w, --wildcard:将每个keyword作为shell样式的通配符解释。 -e, --exact:每个keyword将精确匹配手册页名字和描述。 -a, --and:只显示匹配所有keyword的手册页和描述。默认显示匹配任何keyword的项。 -l, --long:不根据终端宽度缩减输出。 -s section, --section section:只查找指定的手册section。 -m system[,...], --systems=system[,...]:用于查找其它操作系统的手册页。 -M path, --manpath=path:指定从其它以冒号分隔的手册页层次查找。默认使用$MANPATH环境变量。这个选项覆盖$MANPATH的内容。 -L locale, --locale=locale:apropos调用C函数setlocale来得到当前本地化信息,包括$LC_MESSAGE和$LANG。使用该选项提供一个locale字符串来临时更改本地化信息。 -C file, --config-file=file:使用这个用户配置文件而不是默认的~/.manpath。 -h, --help:打印帮助信息并退出。 -V, --version:打印版本信息并退出。
返回值
返回0表示成功,1表示用法、语法或配置文件错误,2表示操作错误,16表示没有找到匹配的内容。
实例
[root@localhost ~]# man -k who at.allow [at] (5) - determine who can submit jobs via at or batch at.deny [at] (5) - determine who can submit jobs via at or batch jwhois (1) - client for the whois service jwhois (rpm) - Internet whois/nicname client. Net::LDAP::Extension::whoami (3pm) - LDAP Who am I? Operation w (1) - Show who is logged on and what they are doing who (1p) - display who is on the system who (1) - show who is logged on whoami (1) - print effective userid [root@localhost ~]# apropos who at.allow [at] (5) - determine who can submit jobs via at or batch at.deny [at] (5) - determine who can submit jobs via at or batch jwhois (1) - client for the whois service jwhois (rpm) - Internet whois/nicname client. Net::LDAP::Extension::WhoAmI (3pm) - LDAP Who am I? Operation w (1) - Show who is logged on and what they are doing who (1p) - display who is on the system who (1) - show who is logged on whoami (1) - print effective userid
apropos -a emacs vi
相关命令
相关文章推荐
- egrep命令_Linux egrep 命令用法详解:在文件内查找指定的字符串
- strings命令_Linux strings 命令用法详解:在对象文件或二进制文件中查找可打印的字符串
- locate/slocate命令_Linux locate/slocate 命令用法详解:查找文件或目录
- rename命令_Linux rename 命令用法详解:用字符串替换的方式批量改变文件名
- 详解Linux系统中字符串搜索命令ngrep的用法
- whereis命令_Linux whereis 命令用法详解:查找二进制程序、代码等相关文件路径
- pidof命令_Linux pidof 命令用法详解:查找指定名称的进程的进程号ID号
- finger命令_Linux finger 命令用法详解:用于查找并显示用户信息
- whatis命令_Linux whatis 命令用法详解:查询一个命令执行什么功能
- find命令_Linux find 命令用法详解:在指定目录下查找文件
- Linux中 find查找命令用法详解
- fgrep命令_Linux fgrep 命令用法详解:为文件搜索文字字符串
- rpmquery命令_Linux rpmquery 命令用法详解:从RPM数据库中查询软件包信息
- badblocks命令_Linux badblocks 命令用法详解:查找磁盘中损坏的区块
- Linux egrep在文件内查找指定的字符串命令详解
- which命令_Linux which 命令用法详解:查找并显示给定命令的绝对路径
- mysqlshow命令_Linux mysqlshow 命令用法详解:显示MySQL中数据库相关信息
- echo命令_Linux echo 命令用法详解:输出指定的字符串或者变量
- linux find命令参数及用法详解--linux查找文件命令
- linux find命令参数及用法详解--linux查找文件命令