Tuesday, March 2, 2010

How to read man page of open system call function.

The manual is generally split into eight numbered sections, organized as follows (on BSD, Unix and Linux):
Section     Description
1     General commands
2     System calls
3     C library functions
4     Special files (usually devices, those found in /dev) and drivers
5     File formats and conventions
6     Games and screensavers
7     Miscellanea
8     System administration commands and daemons

In general if you read a man page of
man open
it will give a man page of  openvt - start a program on a new virtual terminal.We are not in need of this, we are in need of open system calls function man page.so to read this you have to update your man page.

The man page can be update as follows.
Install development man pages
Use apt-get command:
$ sudo apt-get install manpages-dev
so now you are ready to read the man page of open system call.
now type the following command in the terminal as below

man 2 open
this will give the man page of open, creat - open and possibly create a file or device.

Thanks to:
wikipedia and ubuntu forums

No comments:

Post a Comment