【转载】man --help 区别

man 和 --help 区别
系统中会有单独的man文件,命令
man term
等同于
less [manpath] /term.x[.gz]    //x为1-8中的数,视term而定
就是说,如果系统没有安装对应man文件,哪怕term命令完全正常,man term都没结果(同样,只要安装了man文件,哪怕没term命令,也可以得到一大堆东西)。
而--help参数将会显示可执行程序自带的信息,这些信息是嵌入到程序本身的(所以--help信息较简短)。
From: linux man和--help的区别?

man 的使用
man -f command  #精确匹配command帮助信息列表
man -k command  #模糊匹配command帮助信息列表
man 5 command   #定位5的command帮助信息
From: Linux man 命令详细介绍
上面命令中的数字,其实表示该文档所属的分类(节),序号与分类的对应关系为:

点击(此处)折叠或打开

    1    可执行程序或Shell命令
    2    系统调用(内核提供的函数)
    3    由库提供的库函数调用
    4    特殊文件(多现于/dev)
    5    文件格式,如配置文件格式
    6    游戏
    7    杂项,如man 7 man
    8    系统管理工具
    9    Kernel routines [Non standard] ??
From: man的使用参数
原文:

点击(此处)折叠或打开

    Executable programs or shell commands(标准命令)
    System calls (functions provided by the kernel)(系统调用)
    Library calls (functions within program libraries)(库函数)
    Special files (usually found in /dev)(设备说明)
    File formats and conventions eg /etc/passwd(文件格式)
    Games (游戏和娱乐)
    Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)(杂项)
    System administration commands (usually only for root)(管理员命令)
    Kernel routines Non standard
From: help、man和info工具的区别