Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2007

    Lightbulb man stat - Linux Programmer's Manual

    hi there,

    i know that this is a real newbie question to have to ask. but, i can find an answer anywhere :-( .

    could someone please tell me. if i am programming in linux and i want to access the 'Linux Programmer's Manual' page for a given C function, but there is also a linux command with the same name (e.g. stat() function and stat command), how do i access the 'Linux Programmer's Manual' page for the function and not the command manual page. as obviously just typing 'man stat' and the command prompt just gives the command manual page.

    thanks in advance.


    - user0182

  2. #2
    Junior Member
    Join Date
    Jan 2003
    Man pages are stored in sections, usually in the /usr/share/man folder. If there is a page like stat which exists in several sections, the man command always chooses the first one. The man page you are looking for on the stat function is in section 2, whereas the man page on the stat command is in section 1. To view man pages in a different section, use commands like:

    man 2 stat
    On some Linux distributions you need to install the developer manpages first. On Debian/Ubuntu, install the manpages-dev and glibc-doc packages. On Fedora, install the man-pages package.

    Most of the useful programming information is in sections 2 (system functions) and 3 (library functions).

  3. #3
    Join Date
    Sep 2007

    Thank You

    Thanks, that's great :-) !


    - user0182

  4. #4
    Just Another Geek
    Join Date
    Jul 2002
    Rotterdam, Netherlands
    To tell the difference in documentation the different sections would be marked as (1), (2) etc..

    So stat(1) refers to stat in section 1 and stat(2) the one in section 2.

    "man man" for more info
    Oliver's Law:
    Experience is something you don't get until just after you need it.

Similar Threads

  1. Linux TCO not as high as once thought
    By gore in forum Operating Systems
    Replies: 5
    Last Post: May 8th, 2006, 03:31 PM
  2. freeBSD and Linux and windows... how?
    By rider_royal in forum Newbie Security Questions
    Replies: 25
    Last Post: July 3rd, 2005, 10:43 AM
  3. Linux VS BSD (Funny and true/Old)
    By gore in forum Operating Systems
    Replies: 0
    Last Post: September 2nd, 2004, 07:14 AM
  4. Fork in Linux Road?
    By NullDevice in forum Operating Systems
    Replies: 1
    Last Post: April 13th, 2004, 08:38 PM
  5. Installing Linux
    By Rewandythal in forum Other Tutorials Forum
    Replies: 5
    Last Post: December 12th, 2001, 08:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.