天天看點

Linux指令之幫助指令

1、man

功能:線上幫助

用法:man [指令]

1)man指令的可用幫助文檔分類有

代碼

代表内容

1

普通的指令

2

核心調用指令的函數與工具

3

常見的函數與函數庫

4

裝置檔案的說明

5

配置檔案

6

遊戲

7

慣例與協定

8

管理者可用的指令

9

核心相關檔案

2)幫助文檔的目錄結構

結構名稱

代表意義

NAME

指令的名稱

SYNOPSYS

參數的大緻使用方法

DESCRIPTION

介紹說明

EXAMPLES

示範(附帶簡單說明)

OVERVIEW

概述

OEFAULTS

預設的功能

OPRIONS

具體的可用選項(帶介紹)

ENVIRONMENT

環境變量

FILES

用到的檔案

SEEALSO

相關的資料

HISTORY

維護曆史與聯系方式

3)man指令的操作按鍵

按鍵

用處

空格鍵

向下翻一頁

[PageDown]

b

向上翻一頁

[PageUp]

[HOME]

直接前往首頁

[END]

直接前往尾頁

/關鍵詞

從上至下搜尋某個關鍵詞,如/Linux。

?關鍵詞

從下上索某個關鍵詞,如/Linux。

n

定位到下一個搜尋到的關鍵詞

N

定位到上一個搜尋到的關鍵詞

q

退出幫助文檔

2、help    

功能:内置指令幫助

用法:help 内置指令

執行個體:

<code>[root@xuanwei ~]</code><code># help cd</code>

<code>cd</code><code>: </code><code>cd</code> <code>[-L|-P] [</code><code>dir</code><code>]</code>

<code>Change the shell working directory.</code>

<code>Change the current directory to DIR.  The default DIR is the value of the</code>

<code>HOME shell variable.</code>

<code>The variable CDPATH defines the search path </code><code>for</code> <code>the directory containing</code>

<code>DIR.  Alternative directory names </code><code>in</code> <code>CDPATH are separated by a colon (:).</code>

<code>A null directory name is the same as the current directory.  If DIR begins</code>

<code>with a slash (/), </code><code>then</code> <code>CDPATH is not used.</code>

3、--help

功能:一些指令自帶的幫助參數,用來檢視幫助

用法:指令 --help

<code>[root@backup ~]</code><code># ls --help</code>

<code>用法:</code><code>ls</code> <code>[選項]... [檔案]...</code>

<code>列出 FILE 的資訊(預設為目前目錄)。</code>

<code>如果不指定-cftuvSUX 或--</code><code>sort</code> <code>選項,則根據字母大小排序。</code>

<code></code>

本文轉自 炫維 51CTO部落格,原文連結:http://blog.51cto.com/xuanwei/1889264

繼續閱讀