查看man文件
对于使用rpm包安装的man文件,我们可以直接通过man命令后面跟上要查询的命令进行查看。如man ls ,但对于自定义安装的包。大多是放在安装好的share/man目录。而通过cat查看到的文件内容是:
1.TH inotifywait 1 "March 14, 2010" "inotifywait 3.14"
2.SH NAME
3inotifywait - wait for changes to files using inotify
4.SH SYNOPSIS
5.B inotifywait
6.RB [ -hcmrq ]
7.RB [ -e
8<event> ]
9.RB [ -t
10<seconds> ]
11.RB [ --format
12<fmt> ]
13.RB [ --timefmt
14<fmt> ]
15<file> [ ... ]
16.SH DESCRIPTION
17.B inotifywait
18efficiently waits for changes to files using Linux's
19.BR inotify(7)
20interface. It is suitable for waiting for changes to files from shell scripts.
21It can either exit once an event occurs, or continually execute and output events
22as they occur.</file></fmt></fmt></seconds></event>
完全不知所云啊,而要像查看其他命令那样。直接 man 后面跟要查看的man文件,会报错。
1[root@web10 man1]# man inotifywait.1
2Cannot open the message catalog "man" for locale "zh_CN.UTF-8"
而要查看这些文件有两种方法:
<pre class="prettyprint lang-bsh">nroff -man man文件名
另外一种方法相对简单,而且会对关键字加粗显示,给人感觉也友好。就是使用less命令:
1less man文件名
捐赠本站(Donate)
如您感觉文章有用,可扫码捐赠本站!(If the article useful, you can scan the QR code to donate))
- Author: shisekong
- Link: https://blog.361way.com/less-man/1617.html
- License: This work is under a 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议. Kindly fulfill the requirements of the aforementioned License when adapting or creating a derivative of this work.