whatis 和 apropos 命令之间有什么区别?

Mik*_*e B 8 command-line rhel centos

CentOS 6.3 / RHEL 6.3

有人可以解释whatis命令和apropos命令之间的区别吗?我注意到两者似乎都是默认安装的,我不确定它们之间有什么区别。

pal*_*lxk 8

whatis 显示单行手册页说明,旨在让您大致了解程序的作用,

whileapropos搜索手册页名称和说明,旨在帮助您了解在执行某项工作时要使用的程序。

一些例子

说,我想知道df程序做什么。whatis给我答案。

$ whatis df
df (1)               - report file system disk space usage
Run Code Online (Sandbox Code Playgroud)

现在,我想解压缩存档。apropos给我一些选择供考虑。

$ apropos unzip
bunzip2 (1)          - a block-sorting file compressor, v1.0.6
funzip (1)           - filter for extracting from a ZIP archive in a pipe
gunzip (1)           - compress or expand files
lz (1)               - gunzips and shows a listing of a gzip'd tar'd archive
preunzip (1)         - prefix delta compressor for Aspell
unzip (1)            - list, test and extract compressed files in a ZIP archive
unzipsfx (1)         - self-extracting stub for prepending to ZIP archives
uz (1)               - gunzips and extracts a gzip'd tar'd archive
Run Code Online (Sandbox Code Playgroud)

更新

由于这两个whatisapropos搜索数据库的人,你只能得到什么已经安装在系统上的信息。


von*_*and 3

whatis ls列出 的手册页ls,列出标题中apropos ls包含的所有手册页。ls这里的第一个列表给出了 2 个条目,第二个列表给出了 1385 个条目。