Common Law:
man [section] name
including:
section refers to what part of man pages, which can be 2, 3 ... 8, if not specified, man will follow the order and then click Find, find the first one to know.
name refers to a command, function, or file
section below for instructions to do something:
1 = commands (such as cp mv rm, etc.)
2 = system calls (such as openread close, etc.)
3 = C library functions (such as printf)
4 = devices and special files
5 至 8 omitted details, please see: man man
example:
man cp == man 1 cp, 1 normally omitted
man open == man 2 open, but if the words on the wrong man 3open: No entry for open in section 3 of the manual
man printf
Note: This is different from the man 3 printf, because the user command and there was an error printf command control format, so the first show user command: printf,
man 3 printf this is the real query C library functions in the printf function
PS: manpages have a homepage: http://www.kernel.org/pub/linux/docs/man-pages/ provides the latest manpages
Linux C + + under the man installation and use
1. install the C + + help manual
Linux distributions generally not installed by default in C + + help manual installation method is as follows
enter ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen < / strong> / site, or other available sites, I downloaded the file is libstdc + +-api.20130701.man.tar.bz2, of course, you or you can download other versions.
way to relieve stress: tar jxvf libstdc + +-api.20130310.man.tar.bz2. Note: If you are. Bz2 compressed file ending should be j at the beginning, such as tar jxvf .....; if it is. Gz at the end of the compressed file, it should be the beginning of z, such as tar zxvf ....
After decompression, man/man3 all the files copied to / usr/share/man/man3 /, can be.
2. in C + + man pages query function in C + + under Linux
query command or function is used, usually something like:
man printf
man 3 printf
man cat
but in order to avoid operating system, C language and C + +, confusion, currently installed C + + man pages with the above query commands there are some differences, mainly added a namespace qualified, which means that the use of such command: man cout, less than the query.
correct approach should be:
man std :: iostream, and then by searching / cout, cout find instructions
That query command should now
man namespace :: header
man namespace :: header files. Normally: man std :: header files, or man std :: function name, or the man std :: class name
link:
http://hi.baidu.com/linccn/item/a392b235c676aa4d3075a180
http://blog.csdn.net/wangrouyi/article/details/8882937
没有评论:
发表评论