Linux 的man page/info page

本文详细解析了Linux环境下使用manpage命令的方法,包括如何获取命令帮助信息、利用关键字查找相关文档以及manpage的分类。同时介绍了info页与man页的相似之处与区别,提供了快速获取命令和文件格式信息的实用指南。

Man page

1.1 man page(man是manual指令说明)

1.2man 加指令名: man date

得到以下man page


<span style="font-weight: bold; font-family: Arial, Helvetica, sans-serif;">DATE(1)                          User Commands                         DATE(1)</span>
NAME
       date - print or set the system date and time

SYNOPSIS
       date [OPTION]... [+FORMAT]
       date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]

DESCRIPTION
       Display  the  current time in the given FORMAT, or set the system
       date.

       -d, --date=STRING
              display time described by STRING, not 'now'

       -f, --file=DATEFILE
              like --date once for each line of DATEFILE

       -r, --reference=FILE
              display the last modification time of FILE

       -R, --rfc-2822
              output date and time in RFC 2822 format.  Example: Mon, 07
              Aug 2006 12:34:56 -0600

       --rfc-3339=TIMESPEC
              output date and time in RFC 3339 format.  TIMESPEC='date',
              'seconds', or 'ns' for date and time to the indicated pre-
              cision.   Date and time components are separated by a sin-
              gle space: 2006-08-07 12:34:56-06:00
</span>

man page中DATE(1)其中的(1)表示用户可使用的命令,一共有9,分别代表:

(1)用户在shell环境中可以使用的指令或可执行文件
(2)系统内核可调用的函数与工具等
(3)一些常用的函数与函数库,一般为C的函数库
(4)设备文件的说明,一般在/dev下
(5)配置文件或者某些文件的格式
(6)游戏
(7)惯例与协议等,如Linux文件系统,网络协议等
(8)系统管理元可用的管理命令
(9)跟kernel有关的文件

其中(1)(5)(8)尤为重要 

  1.2 man -f man:使用-f 指令获取更多与man相关的信息

[root@mjc80 ~]# man -f man
man                  (1)  - format and display the on-line manual pages
man                  (1p)  - display system documentation
man                  (7)  - macros to format man pages
man.config [man]     (5)  - configuration data for man
man [manpath]        (1)  - format and display the on-line manual pages
man-pages            (7)  - conventions for writing Linux man pages


 1.3 man  -kman 利用关键字找到更多的文件说明数据

[root@mjc80 ~]# man -f man
man                  (1)  - format and display the on-line manual pages
man                  (1p)  - display system documentation
man                  (7)  - macros to format man pages
man.config [man]     (5)  - configuration data for man
man [manpath]        (1)  - format and display the on-line manual pages
man-pages            (7)  - conventions for writing Linux man pages

。。。。。。



info page

1info与man差不多,用来查询命令的用法和文件的格式

2u,n,p 分别是上一个节点,下一个节点,返回上一层


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值