How to obtain Inode statistics for a file

This is a discussion on How to obtain Inode statistics for a file within the C Programming forums, part of the General Programming Boards category; How would I go about obtaining the the inode statistics for a particular file in a program. Thank you...

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    96

    How to obtain Inode statistics for a file

    How would I go about obtaining the the inode statistics for a particular file in a program. Thank you

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,274
    Quote Originally Posted by NuNn View Post
    How would I go about obtaining the the inode statistics for a particular file in a program. Thank you
    stat() will give you the file's vital stats including inode number. Any other stats relating to the inode will be filesystem-specific and might not be accessible except through /proc, and maybe not even that.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 08:54 AM
  2. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 08:51 PM
  3. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 04:39 AM
  4. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 08:01 PM
  5. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 09:19 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21