您的位置:首页 > 其它

man 命令

2016-07-27 16:15 411 查看
man介绍man的不同章节章节1:大部分用户元命令

章节4:设备文件及特殊文件

章节5:配置文件的格式说明

章节8:管理类命令
静态库 以.a结尾

动态库 以.so结尾

其他为开发人员常用的:章节2:系统调用

章节3:c库调用

其他:章节6:游戏

章节7:杂项

章节9:Linux 内核API

man章节的使用
[root@localhost ~]# whatis passwd
passwd (1)           - update user's authentication tokens
sslpasswd (1ssl)     - compute password hashes
passwd (5)           - password file[root@localhost ~]# man 5 passwd
##显示man 5 章节的passwd配置文件
man的显示是使用less来分页的
man -f cmd    #===whatis cmd
man -k password  #搜索whatis,并列出命令或者是说明中含有password的命令
#-k选项查询与cmd相关的所有指令,使用的是whatis数据库(makewhatis | mandb)

[root@localhost ~]# man -k password
#省略
passwd (5)           - password file
passwd2des (3)       - RFS password encryption
password-auth (5)    - Common configuration file for PAMified services
password-auth-ac (5) - Common configuration files for PAMified services written by au...
#省略
内部命令不能够用man,应该使用help移动方法(使用less命令实现的,move同less)
ENTURN | e | j ----> 向文件尾部翻一行
y | k :向文件首部翻一行
Space ----> 向文件尾翻屏
b | ESC-v ----> 向文件首部翻屏
d ----> 向文件尾部翻半屏
u ----> 向文件首部翻半屏
q ----> 退出# ---->跳转至第#行
1G | g ----> 回到文件首部
G ---->:翻至文件尾部
JUMPING
g  <  ESC-<       *  Go to first line in file (or line N)
.
G  >  ESC->       *  Go to last line in file (or line N).
p  %              *  Go to beginning of file (or N percent into file).
t                 *  Go to the (N-th) next tag.
T                 *  Go to the (N-th) previous tag.
{  (  [           *  Find close bracket } ) ].
}  )  ]           *  Find open bracket { ( [.
查看更多快捷键方法:man man 后,输入h,进入帮助页面

man配置文件配置文件:/etc/man.conf或者/etc/man_db.config

man cmd时的查找顺序及定义路径的文件

vi /etc/man_db.config
MANPATH /usr/man
MANPATH /usr/share/man
MANPATH /usr/local/man
MANPATH /usr/local/share/man
MANPATH /usr/X11R6/man
vi /etc/man.conf
MANDATORY_MANPATH                       /usr/man
MANDATORY_MANPATH                       /usr/share/man
MANDATORY_MANPATH                       /usr/local/share/man
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  命令 man