如何在linux中获得C函数的手册页,而不是使用bash命令的人?

时间:2021-04-24 13:54:08

How can I get in linux the man page for C functions and not the shell commands manual?

如何在linux中获得C函数的手册页而不是shell命令手册?

For example when I type man bind I get the man for shell command bind and not the man for socket binding C function.

例如,当我输入man bind时,我得到shell命令bind的man,而不是socket binding C函数的man。

2 个解决方案

#1


22  

man 2 bind

You just need the page from a different manual! :-) See here

您只需要另一个手册中的页面!:-)

Incidentally, bind is a system call, not a C library function. System calls (kernel calls) are in section 2 of the manual, library functions are in section 3. man man will tell you how to use the man command!

顺便说一句,bind是一个系统调用,而不是一个C库函数。系统调用(内核调用)在手册的第2部分,库函数在第3部分。男人会告诉你如何使用男人的命令!

#2


18  

Saying man man would tell you:

男人会告诉你:

SYNOPSIS
   man ... [[section] page ...] ...
   The table below shows the section numbers of the manual followed by the
   types of pages they contain.

   1   Executable programs or shell commands
   2   System calls (functions provided by the kernel)
   3   Library calls (functions within program libraries)
   4   Special files (usually found in /dev)
   5   File formats and conventions eg /etc/passwd
   6   Games
   7   Miscellaneous  (including  macro  packages  and  conventions), e.g.
       man(7), groff(7)
   8   System administration commands (usually only for root)
   9   Kernel routines [Non standard]

For example, man 1 printf would show the manual for the printf shell utility, while man 3 printf would show the manual for printf() in libc.

例如,man 1 printf将显示printf shell实用程序的手册,而man 3 printf将显示libc中printf()的手册。

(When in doubt, say man -k foobar. It will provide a list of man pages with foobar as the regex.)

(当有疑问时,就说man -k foobar。它将提供一个以foobar作为regex的手册页列表。

#1


22  

man 2 bind

You just need the page from a different manual! :-) See here

您只需要另一个手册中的页面!:-)

Incidentally, bind is a system call, not a C library function. System calls (kernel calls) are in section 2 of the manual, library functions are in section 3. man man will tell you how to use the man command!

顺便说一句,bind是一个系统调用,而不是一个C库函数。系统调用(内核调用)在手册的第2部分,库函数在第3部分。男人会告诉你如何使用男人的命令!

#2


18  

Saying man man would tell you:

男人会告诉你:

SYNOPSIS
   man ... [[section] page ...] ...
   The table below shows the section numbers of the manual followed by the
   types of pages they contain.

   1   Executable programs or shell commands
   2   System calls (functions provided by the kernel)
   3   Library calls (functions within program libraries)
   4   Special files (usually found in /dev)
   5   File formats and conventions eg /etc/passwd
   6   Games
   7   Miscellaneous  (including  macro  packages  and  conventions), e.g.
       man(7), groff(7)
   8   System administration commands (usually only for root)
   9   Kernel routines [Non standard]

For example, man 1 printf would show the manual for the printf shell utility, while man 3 printf would show the manual for printf() in libc.

例如,man 1 printf将显示printf shell实用程序的手册,而man 3 printf将显示libc中printf()的手册。

(When in doubt, say man -k foobar. It will provide a list of man pages with foobar as the regex.)

(当有疑问时,就说man -k foobar。它将提供一个以foobar作为regex的手册页列表。