Linux 中的幫助

Table of Contents

1.   --help

2.whatis 

3.man   等級數 


在Linux中我們要查命令的用法就可以用到幫助

1.<command>  --help

用此命令可以查看命令的基本用法,例如:

[dw@localhost Desktop]$ passwd --help
Usage: passwd [OPTION...] <accountName>
  -k, --keep-tokens       keep non-expired authentication tokens
  -d, --delete            delete the password for the named account (root
                          only); also removes password lock if any
  -l, --lock              lock the password for the named account (root only)
  -u, --unlock            unlock the password for the named account (root only)
  -e, --expire            expire the password for the named account (root only)
  -f, --force             force operation
  -x, --maximum=DAYS      maximum password lifetime (root only)
  -n, --minimum=DAYS      minimum password lifetime (root only)
  -w, --warning=DAYS      number of days warning users receives before password
                          expiration (root only)
  -i, --inactive=DAYS     number of days after password expiration when an
                          account becomes disabled (root only)
  -S, --status            report password status on the named account (root
                          only)
      --stdin             read new tokens from stdin (root only)

Help options:
  -?, --help              Show this help message
      --usage             Display brief usage message

可以看到給出了三列,第一列爲參數,第二列爲具體表示的意思,第三列爲詳細的解釋。

其中首行中[]中的內容爲選填,<>中的內容爲必填,內容後面 ... 表示可以填多項。

2.whatis  <command>

用此命令可以查看命令的用途,例如:

[dw@localhost Desktop]$ whatis passwd
passwd (5)           - password file
openssl-passwd (1ssl) - compute password hashes
passwd (1)           - update user's authentication tokens

3.man   等級數  <command>

我們可以先用whatis 命令查看對應命令有哪幾個級別的幫助信息,然後進入man命令查看幫助。

man手冊的使用方法:

上下健瀏覽

space健向後翻一頁

b             向前翻一頁

Enter      向後翻一行

k              向前翻一行

查看時要查找時:

/關鍵詞    或者   ?關鍵詞

n              向後查找

N             向前查找

 

 

 

發佈了14 篇原創文章 · 獲贊 2 · 訪問量 2949
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章