查看man文件

对于使用rpm包安装的man文件,我们可以直接通过man命令后面跟上要查询的命令进行查看。如man ls ,但对于自定义安装的包。大多是放在安装好的share/man目录。而通过cat查看到的文件内容是:

.TH inotifywait 1 "March 14, 2010" "inotifywait 3.14"
.SH NAME
inotifywait - wait for changes to files using inotify
.SH SYNOPSIS
.B inotifywait
.RB [ -hcmrq ]
.RB [ -e
<event> ]
.RB [ -t
<seconds> ]
.RB [ --format
<fmt> ]
.RB [ --timefmt
<fmt> ]
<file> [ ... ]
.SH DESCRIPTION
.B inotifywait
efficiently waits for changes to files using Linux's
.BR inotify(7)
interface.  It is suitable for waiting for changes to files from shell scripts.
It can either exit once an event occurs, or continually execute and output events
as they occur.

完全不知所云啊,而要像查看其他命令那样。直接 man 后面跟要查看的man文件,会报错。

[root@web10 man1]# man inotifywait.1
Cannot open the message catalog "man" for locale "zh_CN.UTF-8"

而要查看这些文件有两种方法:

nroff -man man文件名

另外一种方法相对简单,而且会对关键字加粗显示,给人感觉也友好。就是使用less命令:

less man文件名

 




本站的发展离不开您的资助,金额随意,欢迎来赏!

You can donate through PayPal.
My paypal id: itybku@139.com
Paypal page: https://www.paypal.me/361way

分类: Linux/unix/mac 标签:
  1. 本文目前尚无任何评论.