「学习笔记——Linux」Linux的帮助系统

时间:2022-12-04 15:34:03


Linux的帮助系统

Table of Contents

1 man

1). 基本使用及man文件基本结构 

      $man date

DATE(1)                          User Commands                         DATE(1)

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'
EXAMPLE
       ...
DATE STRING
       ...
AUTHOR
       ...
REPORTING BUGS
       ...
COPYRIGHT
       ...
SEE ALSO
      The full documentation for date is maintained as a Texinfo manual.   If
       the  info  and  date  programs are properly installed at your site, the
       command

              info coreutils 'date invocation'

       should give you access to the complete manual.

2). man文件分类 DATE(1),括号里的1就是分类号

  • 1:用户在 shell 环境中可以操作的指令或可执行文件
  • 2:系统核心可呼叫函数与工具
  • 3…
  • 具体的分类可以用man man查阅

3). 搜索关键词 向下"/",向上"?",n/N继续搜索 键入"/",例如搜索"foo": /foo

4). 配置 /etc/manpath.config 从这也可以看出man文件的路径

5). 查阅指令

  • man -f == whatis
    $ whatis date
    date (1)             - print or set the system date and time
    $ man -f date
    date (1)             - print or set the system date and time
    
  • man -k == apropos
    $ apropos date
    asctime (3)          - transform date and time to broken-down time or ASCII
    asctime_r (3)        - transform date and time to broken-down time or ASCII
    cal (1)              - displays a calendar and the date of Easter
    ....
    

2 info

info指令提供了另一种帮助形式,分段落,分层次说明指令功能

3 doc

这是一些软件的文档目录,doc目录通常为/usr/share/doc/softwareName