linux man手册使用说明

版权声明:学习记录,积少成多 https://blog.csdn.net/changliang7731/article/details/53055826

man手册使用说明:
man num func

其中,num的含义如下:
1:可执行程序或 shell 命令
2: 系统调用(内核提供的函数)
3:库调用(程序库中的函数)
4:特殊文件(通常位于 /dev)
5:文件格式和规范,如/etc/passwd
6:游戏
7:杂项(包括宏包和规范,如man(7),groff(7))
8:系统管理命令(通常只针对root 用户)
9:内核例程 [非标准]


man通常按照一定顺序查找并只显示找到的第一个 页,即使多个 章节 中都有这个 页面
如果要显示全部包含该函数的页,加-a
man -a func
正确执行时显示手册中包含的所有可用的手册页。可以在连续显示过程中退出或跳过任一页


man -k func (printf)
Search the short descriptions and manual page names for the keyword printf as regular expression. Print out any matches. Equivalent to apropos printf.
例如:


man -f func (printf)
Lookup the manual pages referenced by printf and print out the short descriptions of any found. Equivalent to whatis printf.
例如:


man -K num string
在所有手册中搜索文本。这是蛮力搜索,需要花费一定时间;如果可以,您应该指定手册章节以减少需要搜索的手册页数量


man -i
搜索手册页时忽略大小写。此为默认值。
man -I
搜索手册页时匹配大小写。


退出状态:
0 程序成功执行
1 用法、语法或配置文件出错
2 操作出错
3 子进程返回了非零的退出状态码
16 至少有一个页面/文件/关键词不存在或不匹配


在当前页进行字符串查找
/string
n向后继续关键字搜索
N向前继续关键字搜索


书签:man中可以定义书签,当我们想把帮助页的某个位置记录下来以便后面查看,就可以定义个书签。例如在当前位置定义个书签letter,我们需要输入m键后,再输入定义的书签名letter即可。那么如何使用这个书签呢?在当前帮助页里输入单引号’letter就可以定位到书签的位置


退出:q ctrl+c


猜你喜欢

转载自blog.csdn.net/changliang7731/article/details/53055826