1 | whatis
|
2 | ===
|
3 |
|
4 | 查询一个命令执行什么功能
|
5 |
|
6 | ## 补充说明
|
7 |
|
8 | **whatis命令** 是用于查询一个命令执行什么功能,并将查询结果打印到终端上。
|
9 |
|
10 | whatis命令在用`catman -w`命令创建的数据库中查找command参数指定的命令、系统调用、库函数或特殊文件名。whatis命令显示手册部分的页眉行。然后可以发出man命令以获取附加的信息。whatis命令等同于使用`man -f`命令。
|
11 |
|
12 | ### 语法
|
13 |
|
14 | ```shell
|
15 | whatis
|
16 | ```
|
17 |
|
18 | ### 实例
|
19 |
|
20 | ```shell
|
21 | [root@localhost ~]# whatis ls
|
22 | ls (1) - list directory contents
|
23 | ls (1p) - list directory contents
|
24 |
|
25 | [root@localhost ~]# whatis cp
|
26 | cp (1) - copy files and directories
|
27 | cp (1p) - copy files
|
28 |
|
29 | [root@localhost ~]# whatis chown
|
30 | chown (1) - change file owner and group
|
31 | chown (1p) - change the file ownership
|
32 | chown (2) - change ownership of a file
|
33 | chown (3p) - change owner and group of a file
|
34 |
|
35 | [root@localhost ~]# whatis man
|
36 | man (1) - format and display the on-line manual pages
|
37 | man (1p) - display system documentation
|
38 | man (7) - macros to format man pages
|
39 | man (rpm) - A set of documentation tools: man, apropos and whatis.
|
40 | man-pages (rpm) - Man (manual) pages from the Linux Documentation Project.
|
41 | man.config [man] (5) - configuration data for man
|
42 | ```
|
43 |
|
44 |
|