[chengmo@centos5 ~]$
man
-w
passwd
/usr/share/man/man1/passwd
.1.gz
#显示passwd帮助文件路径,passwd.1 通过名称知道这个是passwd命令帮助手册,那它的其它命令的呢?
[chengmo@centos5 ~]$
man
-aw
passwd
/usr/share/man/man1/passwd
.1.gz
/usr/share/man/man5/passwd
.5.gz
#加入-a获得所有帮助手册文件地址,默认只会查找一个
[chengmo@centos5 ~]$
man
5
passwd
#只得到passwd配置文件帮助信息,可以加入领域类型限制,如果知道5,默认是查询man5 文件配置信息说明 手册目录
[chengmo@centos5 ~]$
man
-d
passwd
Reading config
file
/etc/man
.config
.....
found
man
directory
/usr/man
using
/usr/bin/less
-is as pager
using
/usr/bin/less
-is as browser
using
/bin/cat
to dump HTML pages as text
path directory
/bin
is
in
the config
file
adding
/usr/share/man/zh_CN
to manpath
adding
/usr/share/man
to manpath
found
'NROFF_OLD_CHARSET'
in
path
old charset of
'/usr/share/man/man1/passwd.1.gz'
is
'ISO-8859-1'
man
:
not executing
command
:
(
cd
/usr/share/man
&& (
echo
".ll 11.8i"
;
echo
".nr LL 11.8i"
;
echo
".pl 1100i"
;
/usr/bin/gunzip
-c
'/usr/share/man/man1/passwd.1.gz'
;
echo
".\\\""
;
echo
".pl \n(nlu+10"
) |
/usr/bin/gtbl
|
/usr/bin/nroff
-c --legacy ISO-8859-1 -mandoc 2>
/dev/null
|
/usr/bin/less
-is)
#man -d 返回man 执行过程搜索查找方法,以及查询手册通过怎么样格式化语句显示。都会列出来
#可以看到,指定pages,borwser输出命令对应文件,html输出文件,搜索路径,由于我当前LANG=zh_CN.gb2312因此,添加了zh_CN目录搜索
#最终执行命令时候,通过一系列格式转换命令,最终有less显示
[chengmo@centos5 ~]$
man
-S 1:2
passwd
#在领域类型是:1:2 范围内查找手册,对应目录分别是man1 ,man2
[chengmo@centos5 ~]$
man
-f httpd
httpd (8) - Apache Hypertext Transfer Protocol Server
httpd (rpm) - Apache HTTP Server
httpd-devel (rpm) - Development tools
for
the Apache HTTP server.
#在whatis数据库(有所有网站man帮助以及cat,doc帮助信息索引)中查询,文件标题以:http开头信息的文档
#中间的(8) 对应我们可以用:man 8 httpd 调用,对于显示(rpm)实际上显示有个httpd帮助信息,是属于一个httpd rpm安装包,通过man rpm httpd查看不了。可以通过rpm -ql httpd 查找安装包
[chengmo@centos5 ~]$
man
-k httpd
CGI::Carp (3pm) - CGI routines
for
writing to the HTTPD (or other) error log
httpd (8) - Apache Hypertext Transfer Protocol Server
httpd (rpm) - Apache HTTP Server
httpd-devel (rpm) - Development tools
for
the Apache HTTP server.
httpd_selinux (8) - Security Enhanced Linux Policy
for
the httpd daemon
lighttpd (1) - a fast, secure and flexible webserver
lighttpd (rpm) - Lightning fast webserver with light system requirements
lighttpd-fastcgi (rpm) - FastCGI module and spawning helper
for
lighttpd and PHP configuration
ncsa_auth (8) - NCSA httpd-style password
file
authentication helper
for
Squid
#在whatis数据库中,查询包含httpd所有帮助手册,以及安装包. 可以通过:rpm -ql lighttpd
[chengmo@centos5 ~]$ rpm -ql lighttpd |
grep
gz
/usr/share/man/man1/lighttpd
.1.gz
#其实这个包刚好是:lighttpd (1) - a fast, secure and flexible webserver 帮助手册
[chengmo@centos5 ~]$
man
-w
/usr/kerberos/man
:
/usr/local/share/man
:
/usr/share/man/zh_CN
:
/usr/share/man
:
/usr/local/man
#显示man 命令查找手册的路径