擷取Linux命令協助的六種方法

來源:互聯網
上載者:User

   一 、help Command

  適用於內部命令

  舉例:

  代碼如下:

  # type cd

  cd is a shell builtin

  # help cd

  # type ls

  ls is aliased to `ls --color=auto'

  # help ls

  -bash: help: no help topics match `ls'. Try `help help' or `man -k ls' or `info ls'.

  二、Command –help/-h

  適用於外部命令

  例如:

  代碼如下:

  # ls --help

  三、man Command

  舉例:

  代碼如下:

  # man cd

  注manual 手冊是分章節的;man # Command (#表示章節號)

  1、所有使用者可以使用的命令

  2、系統核心調用,不是每個命令都有系統調用(如:man 2 read)

  3、庫調用

  4、特殊檔案,如:/dev/tty1

  5、檔案格式(命令設定檔的文法,如:man 5 passwd)

  6、遊戲相關

  7、雜項

  8、管理員命令,如:fdisk

  man命令查詢操作參考《vi,vim用法》中的命令模式

  看懂man命令文法

  []:可選內容

  <>:必須給出內容

  a|b|c:多選一

  …:可以有多個

  四、 info Command

  有超連結穩文檔,info是資訊頁,提供作者、版本,什麼時候發布等更詳細資料,man手冊是告訴你怎麼用

  五、README

  絕大多數程式都有相應的協助文檔,儲存在/usr/share/doc檔案夾中

  如:

  # ls /usr/share/doc/ntp-4.2.4p8/

  ChangeLog COPYRIGHT NEWS

  六、Google

  遇到問題,二話不說Google,優先參考項目官方文檔

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.