Chinaunix首页 | 论坛 | 博客
  • 博客访问: 179699
  • 博文数量: 47
  • 博客积分: 992
  • 博客等级: 准尉
  • 技术积分: 565
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-08 21:57
文章分类

全部博文(47)

文章存档

2019年(1)

2018年(1)

2017年(1)

2014年(6)

2013年(1)

2012年(2)

2011年(35)

我的朋友

分类: LINUX

2011-06-09 17:26:45

LinuxAdmin110609: man命令注记


Email:    zcatt@163.com
Blog    http://zcatt.blog.chinaunix.net
 
声明
仅限学习交流,禁止商业用途。转载需注明出处。

版本记录
Date        Ver        Note
2011-06-09    0.1        Draft.  zcatt, Beijing

1. man命令的使用
=======================

linux中的man命令方便查询各种命令.常用的简单命令形式如下,

   
  1. man [
    ]

其中section是指手册中的分部. 有8个section,

    1. user commands
    2. system calls
    3. C lib functions
    4. devices and special files
    5. file format and conventions
    6. games et. Al.
    7. miscellanea
    8. system administration tools and daemons

这8个section下还可以有更小的分部.
经常会碰到要查的name出现在多个分部中, 要想确定那个是自己要寻找的, 可以使用下面的命令

  
  1. man -f
    或
   
  1. whatis

两个命令等同.

例如, 查perl中的open, 那么
  1. $ man -f open
  2. open (2) - open and possibly create a file or device
  3. open (3p) - open a file

可见是在3pm分部中, 则
  1. $man 3p open
   

2. man界面的使用
=======================

man界面中键入h或H可以调出help提示.
常用的操作,
/pattern    向下寻找pattern匹配的内容
?pattern    向上寻找pattern匹配的内容

n        向下寻找次刚才的/pattern寻找. 代表的是一个数字
N        向上寻找次刚才的/pattern寻找. 代表的是一个数字


2. man的配置
=======================

一般man的配置文件是/etc/man.config.
另外, 如果查询不到, 那么可能是对应的man文件没有安装, 可以到网上下载并安装.


Locations of visitors to this page
阅读(512) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~