linux 下man幫助是非常必要的,因為每個人不可能都記住命令和引數。
可以輸入 「命令 --help」,然後會顯示幫助,而且有中文,但是有些命令不如 「man 命令」全。
輸入命令後出現的格式:
name 簡短的命令,資料名稱的說明
synopsis 簡短的執行語法簡介
description 教為完整的說明
option 針對synopsis部分,列舉出所有的可用的選項說明
commands 針對這個程式指向的過程中,可以在程式中執行的命令
files 這個程式或資料所使用或參考或連線到的某些檔案
see also 這寫命令相關的其他說明
example 一些可以參考的範例
bugs 是否有相關的錯誤
1 使用者在shell環境可以操作的命令或可執行檔案
2 系統核心呼叫的函式和工具
3 一些常用的函式和函式庫,大部分是c 函式庫
4 裝置檔案的說明,通常是在/dev下的檔案
5配置檔案或者某些檔案的格式
6遊戲7慣例和協議等,如linux檔案系統,網路協議,ascii code 等說明
8 網路管理員可以使用到命令
9跟kernel有關的命令
至少另方面功能,比如,你要查詢到資訊有多種**,可以很方便到查詢自己要到那乙個,比如
man 1 sleep 這個sleep是shell環境下到
man 3 sleep 這個查詢到是c函式
另乙個方面,你可以知道自己查詢到資訊是屬於哪個類的
man -數字 查詢到資訊 ,輸入後可以在指定到型別查詢對應到幫助內容
man 命令,回車以後出來一堆東西,要在這裡面查詢字串,只要按下/,然後輸入就可以了,這個是向後查詢,?+字串是向前查詢,類似與 vim編輯器。查到後輸入n可以向
向下查下乙個,n反向查
在某些情況下,知道某些特定到命令或者修改某些特定到檔案,但是偏偏忘記了命令到完全名稱,只記得部分關鍵字。
這樣情況,可以根據前面說的制定數字來查詢。
還是比如 我就記得這個命令好像是sleep,但是具體是那乙個我忘記了,如果我只接輸入man sleep輸出到是第乙個查詢到到,萬一我找的不是第乙個呢,也許sleep有多個呢,
向看看一共有幾個。man -f 命令
man -f sleep
sleep (1) - delay for a specified amount of time
sleep (1p) - suspend execution for an interval
sleep (3p) - suspend execution for an interval of time
sleep (3) - sleep for the specified number of seconds
內容如上
顯示到結果,左邊命令或者檔案以及該命令所代表到含義,就是那個數字,右邊部分:這個命令到簡易說明。
這個找到是完整名稱,錯一點也不會顯示。
萬一 我記不清了,就記得個別關鍵字。可以使用man -k 命令
man -k sleep 的結果
sleep (1) - delay for a specified amount of time
sleep (1p) - suspend execution for an interval
sleep (3p) - suspend execution for an interval of time
sleep (3) - sleep for the specified number of seconds
[vbird@localhost 桌面]$ man -k sleep
clock_nanosleep (2) - high-resolution sleep with specifiable clock
clock_nanosleep (3p) - high resolution sleep with specifiable clock (advanced realtime)
nanosleep (2) - high-resolution sleep
nanosleep (3p) - high resolution sleep (realtime)
rtcwake (8) - enter a system sleep state until specified wakeup time
sleep (1) - delay for a specified amount of time
sleep (1p) - suspend execution for an interval
sleep (3p) - suspend execution for an interval of time
sleep (3) - sleep for the specified number of seconds
usleep (1) - sleep some number of microseconds
usleep (3p) - suspend execution for an interval
usleep (3) - suspend execution for microsecond intervals
whatis =man -f apropos = man -k ,但是這兩個命令要能用,必須要建立whatis資料庫,以root身份,執行 makewhatis
除了man 以外還有很多有用到檔案放在/usr/share/doc目錄下
Linux幫助手冊(man)
目錄 格式 whatis command 作用 顯示命令的簡短描述 類似命令 man f command 更新命令 centos 6 makewhatis centos 7 mandb 位置 centos 6 var cache man whatis 由於whatis獲取的資訊都是從man中得到的,...
FreeMarker幫助手冊
freemarker學習1 ftl 2008 07 31 13 47 中存放所有freemaker的內容,之外的內容全部原樣輸出。是函式呼叫 兩個定界符內的內容中,第乙個符號表示指令或者函式名,其後的跟隨引數。freemaker提供的控制包括如下 if condition elseif condit...
man 幫助手冊
常用的命令選項 f,whatis 相當於 whatis k,apropos 相當於 apropos w,where,path,location 列印手冊頁的物理位置 w,where cat,location cat 列印 cat 檔案的物理位置 m,manpath path 將手冊頁的搜尋路徑設定為...