UNPKG

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