帮助命令man (manual)
比如我们可以看下man命令的解释
[root@localhost ~]# man man
MAN(1) Manual pager utils MAN(1)
NAME
man - an interface to the on-line reference manuals
SYNOPSIS
man [-C file] [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L locale] [-m system[,...]] [-M path] [-S list] [-e exten‐
sion] [-i|-I] [--regex|--wildcard] [--names-only] [-a] [-u] [--no-subpages] [-P pager] [-r prompt] [-7] [-E encoding]
[--no-hyphenation] [--no-justification] [-p string] [-t] [-T[device]] [-H[browser]] [-X[dpi]] [-Z] [[section]
page ...] ...
man -k [apropos options] regexp ...
man -K [-w|-W] [-S list] [-i|-I] [--regex] [section] term ...
man -f [whatis options] page ...
man -l [-C file] [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L locale] [-P pager] [-r prompt] [-7] [-E encoding] [-p
string] [-t] [-T[device]] [-H[browser]] [-X[dpi]] [-Z] file ...
man -w|-W [-C file] [-d] [-D] page ...
man -c [-C file] [-d] [-D] page ...
man [-?V]
DESCRIPTION
man is the system‘s manual pager. Each page argument given to man is normally the name of a program, utility or function.
The manual page associated with each of these arguments is then found and displayed. A section, if provided, will direct
man to look only in that section of the manual. The default action is to search in all of the available sections, follow‐
Manual page man(1) line 1 (press h for help or q to quit)
查看完 按 "q"键,离开
我们看下ls
man ls
这里其实有很多行 我们可以按键盘的向下键盘,来显示下方隐藏的内容;
当然也可以搜索
/ 加搜索内容
比如搜索 -d
/-d
这里的1是man的级别; 这里的1是查看命令的帮助
1:查看命令的帮助
2:查看可被内核调用的函数的函数的版主
3:查看函数和函数库的帮助
4:查看特殊文件的帮助(主要是/dev目录下的文件)
5:查看配置文件的帮助
6:查看游戏的帮助
7:查看其他杂项的帮助
8:查看系统管理员可用命令的帮助
9:查看和内核相关文件的帮助
查看命令拥有哪个级别的帮助
man -f 命令
相当于
whatis 命令
举例
man -5 passwd
man -4 null
man -8 ip
比如查看ls的命令级别
[root@localhost ~]# man -f ls
ls (1) - list directory contents
[root@localhost ~]#
只有1个
[root@localhost ~]# man -f ip
ip (8) - show / manipulate routing, devices, policy routing...
[root@localhost ~]#
查看和命令相关的所有帮助
man -k 命令
相当于
appropos 命令
例如
apropos passwd
[root@localhost ~]# man -k passwd
chpasswd (8) - 批量更新密码
gpasswd (1) - 管理员 /etc/group 和 /etc/gshadow
grub2-mkpasswd-pbkdf2 (1) - Generate a PBKDF2 password hash.
lpasswd (1) - Change group or user password
pam_localuser (8) - require users to be listed in /etc/passwd
passwd (1) - update user‘s authentication tokens
sslpasswd (1ssl) - compute password hashes
pwhistory_helper (8) - Helper binary that transfers password hashes from ...
[root@localhost ~]#
能把相关的命令都查询出来;
原文:http://www.cnblogs.com/wishwzp/p/7113356.html