当man命令查找不到自己所需到函数怎么办?

软件和网站开发以及相关技术探讨
回复
cmjauto
帖子: 27
注册时间: 2013-01-23 21:46
系统: windows xp

当man命令查找不到自己所需到函数怎么办?

#1

帖子 cmjauto » 2013-02-27 22:06

大家好!
举个简单到例子,我想查open函数的用法,可是输入“man open”之后,发现不是自己所需要到那个打开文件到函数。那此时我应该怎么办呢?
如果碰到一个函数在man帮助文档中有很多,岂不是一定要man 2 open; man 3 open; 。。。。。。一个一个的去尝试吗?
本人新手,可能对man帮助系统不了解,还望各位朋友指点一番,谢谢!
头像
cuihao
帖子: 4793
注册时间: 2008-07-24 11:33
来自: 郑州
联系:

Re: 当man命令查找不到自己所需到函数怎么办?

#2

帖子 cuihao » 2013-02-27 22:12

不同的数字代表不同类别的手册。

man man:

代码: 全选

       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]

       A manual page consists of several sections.
求人不如求它仨: 天蓝的Wiki 屎黄的Wiki 绿
Site: CUIHAO.TK    Twitter: @cuihaoleo
Machine: Athlon64 X2 5200+ / 2x2GB DDR2-800 / GeForce GTS 450
AD: ~まだ見ぬ誰かの笑顔のために~
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 当man命令查找不到自己所需到函数怎么办?

#3

帖子 eexpress » 2013-02-27 22:33

open函数的用法
不如直接说,是哪里的open。这可多了。
说不定你直接安装devhelp更好。
● 鸣学
cmjauto
帖子: 27
注册时间: 2013-01-23 21:46
系统: windows xp

Re: 当man命令查找不到自己所需到函数怎么办?

#4

帖子 cmjauto » 2013-02-27 22:45

cuihao 写了:不同的数字代表不同类别的手册。

man man:

代码: 全选

       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]

       A manual page consists of several sections.
谢谢,明白了一些。
顺便问一下,您是如何将终端中的感兴趣到内容复制到浏览器中的,总不能把man man的指令结果全部导入到一个文件,然后再选取上述内容吧?我是心血来潮问一下,麻烦回复下, :em02
头像
cuihao
帖子: 4793
注册时间: 2008-07-24 11:33
来自: 郑州
联系:

Re: 当man命令查找不到自己所需到函数怎么办?

#5

帖子 cuihao » 2013-02-27 23:22

= = 用鼠标选,复制粘贴。
求人不如求它仨: 天蓝的Wiki 屎黄的Wiki 绿
Site: CUIHAO.TK    Twitter: @cuihaoleo
Machine: Athlon64 X2 5200+ / 2x2GB DDR2-800 / GeForce GTS 450
AD: ~まだ見ぬ誰かの笑顔のために~
cmjauto
帖子: 27
注册时间: 2013-01-23 21:46
系统: windows xp

Re: 当man命令查找不到自己所需到函数怎么办?

#6

帖子 cmjauto » 2013-02-28 21:50

cuihao 写了:= = 用鼠标选,复制粘贴。
额,惭愧……谢谢指点帮助。
cmjauto
帖子: 27
注册时间: 2013-01-23 21:46
系统: windows xp

Re: 当man命令查找不到自己所需到函数怎么办?

#7

帖子 cmjauto » 2013-03-03 20:58

eexpress 写了:open函数的用法
不如直接说,是哪里的open。这可多了。
说不定你直接安装devhelp更好。
您好!
首先,谢谢您的回复。
这里我按照您的说法,安装了devhelp,可是发现里面只有Glib Reference Manual,还有一些其他不认识的参考手册。我随便搜索一个open函数,发现只有g_open(),而且该手册里面也提到了让我
“See your C library manual for more details about open().
filename : a pathname in the GLib file name encoding (UTF-8 on Windows);
flags : as in open();
mode : as in open(); ”

貌似,它也没明确提及g_open()的用法,反而提及了另一个C参考手册。那我想问的是:
1)Glib Reference Manual与我们在windows平台下的C参考手册(比如MSDN)有什么区别?

2)我在linux平台下要想查看某一个函数等用法,除了man之外,应该参考哪一个手册呢?linux平台下有类似msdn这样的参考手册吗?

3)如果您能提供一个介绍如上问题的链接或者书本的话,那再感激不过了,其实本人也不愿每次拿这些基础肤浅的问题来叨扰像您这样的高手……

方便的时候,还望回复下,谢谢!
回复