Chinaunix首页 | 论坛 | 博客
  • 博客访问: 968666
  • 博文数量: 200
  • 博客积分: 5011
  • 博客等级: 大校
  • 技术积分: 2479
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-27 15:07
文章分类

全部博文(200)

文章存档

2009年(12)

2008年(190)

我的朋友

分类:

2008-11-12 11:16:27

Usage

To read a manual page for a Unix command, one can use

man 

at a prompt; for example, "man ftp". In order to simplify paging through the output man generally uses the file viewer.

Pages are traditionally referred to using the notation "name(section)"; for example, . The same page name may appear in more than one section of the manual, this can occur when the names of , user , or conflict. Two examples are and , or and . The syntax for accessing the non-default manual section varies between different man implementations. On Linux and *BSD, for example, the syntax for reading is

man 3 printf

那么,默认的一些sectin对应的编号和内容: 所以要想查一些C接口,可以用man 3

Manual sections

The manual is generally split into eight numbered sections, organized as follows (on Unix and ):

Section Description
1 General
2
3 functions
4 (usually devices, those found in /dev) and
5 and conventions
6 and
7 Miscellanea
8 System administration and

Unix uses a similar numbering scheme, except section 4 is file formats, section 5 is miscellany and section 7 is special files.

On some systems some of the following sections are available:

Section Description
0
9 routines
n / keywords
x The

The sections are further subdivided by means of a suffix letter, such that section 3C is for C library calls, 3M is for the math library, and so on. A consequence of this is that section 8 (system administration commands) is sometimes relegated to the 1M subsection of the main commands section. Some subsection suffixes have a general meaning across sections:

Subsection Description
p specifications
x documentation

Some versions of man cache the formatted versions of the last several pages viewed.

To see options you can use with command man, enter the command man man.

[] Layout

All man pages follow a common layout that is optimized for presentation on a simple text display, possibly without any form of highlighting or font control. Sections present may include:

  • NAME — The name of the command or function, followed by a one-line description of what it does.
  • SYNOPSIS — In the case of a command, you get a formal description of how to run it and what command line options it takes. For program functions, a list of the parameters the function takes and which header file contains its definition. For experienced users, this may be all the documentation they need.
  • DESCRIPTION — A textual description of the functioning of the command or function.
  • EXAMPLES — Some examples of common usage.
  • SEE ALSO — A list of related commands or functions.

Other sections may be present, but these are not well standardized across man pages. Common examples include: OPTIONS, EXIT STATUS, ENVIRONMENT, KNOWN BUGS, FILES, AUTHOR, REPORTING BUGS, HISTORY and COPYRIGHT.


阅读(1519) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~