天天看點

Linux指令(17):help指令

help指令

功能說明

    help指令隻能顯示shell内部的指令幫助資訊。而對于外部指令的幫助資訊隻能使用man或者info指令檢視,還可以使用--help指令顯示指令的使用資訊。用法如下:

  help (選項) (參數)

指令參數

選項

含義

-d

輸出每個主題的簡短描述

-m

以 man 手冊的格式顯示使用方法

-s

顯示簡單的幫助資訊

示例

    查使用help顯示内部cd指令的幫助資訊

[root@c7 ~]# type cd                                       #檢視cd是内嵌指令

cd 是 shell 内嵌

[root@c7 ~]# help cd                                       #檢視cd幫助資訊

cd: cd [-L|[-P [-e]]] [dir]

    Change the shell working directory.

    Change the current directory to DIR.  The default DIR is the value of the

    HOME shell variable.

...略

[root@c7 ~]# help -d cd                                   #使用-d選項,檢視指令的簡短描述

cd - Change the shell working directory.

[root@c7 ~]# help -m cd                                  #使用-m選項,以man手冊檢視

NAME

    cd - Change the shell working directory.

SYNOPSIS

    cd [-L|[-P [-e]]] [dir]

DESCRIPTION

[root@c7 ~]# help -s cd                                    #使用-s選項,簡單幫助資訊

      本文轉自cix123  51CTO部落格,原文連結:http://blog.51cto.com/zhaodongwei/1871458,如需轉載請自行聯系原作者

繼續閱讀