linux帮助命令whatis,linux命令之whatis

最有用的命令之一是那些提供帮助的命令(特别是对那些学习 Linux 的人而言)。Linux 中的两个重要的信息来源是联机参考手册,或man页面和whatis工具。您可以用whatis命令来访问一个不熟悉的命令的 man 页面。

$ whatis echo

要了解关于这个命令的更多信息,可以使用:

$ man  echo

如果您不知道某个特殊任务所需的命令,您可以用man -k(也称为apropos)和一个主题来生成可能的命令。例如:

$ man -k files

一个很有用但常常被忽视的命令可以提供关于使用man本身的信息:

$ man man

您可以用 SPACEBAR 来浏览任意的 man 页面;UP ARROW 将向上翻滚文件。.要退出,则输入 q,!,或 CTRL-Z。

通过makewahtis建立wathis所需数据库

[root@server1 ~]# whatis ls

ls                   (1)  - list directory contents

ls                   (1p)  - list directory contents

[root@server1 ~]# whatis cat

cat                  (1)  - concatenate files and print on the standard output

cat                  (1p)  - concatenate and print files

里面的1和1p是section

常见的包括

Sections of the Manual Pages

The manual Sections are traditionally defined as follows:

1 Commands (Programs)

Those commands that can be executed by the user from within a shell.

2 System calls

Those functions which must be performed by the kernel.

3 Library calls

Most of the libc functions.

4 Special files (devices)

Files found in /dev.

5 File formats and conventions

The format for /etc/passwd and other human-readable files.

6 Games

7 Conventions and miscellaneous

Overviews of various topics, conventions and protocols, character set standards, and miscellaneous other things.

8 System management commands

Commands like mount(8), many of which only root can execute.

此外:

man-pages currently includes pages from the POSIX.1 standard in Section 0p (Header Files), 1p (Commands), and 3p (Functions).

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值