Table of Contents
在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 向前查找


786

被折叠的 条评论
为什么被折叠?



