On Wed, Sep 30, 2009 at 11:34:16AM +0530, Siju George wrote: > Hi, > > How is it possible for me to read the contents on i-nodes in a file system? > Also list the i-nodes that are in use or used earlier? >
First of all I think it depends on system calls like statfs whether they provide such a facility (which I doubt). You can also modify statfs of a particular filesystem to implement this. For ex. In ext2fs of FreeBSD vfs_statfs_t is linked ext2_statfs, which indicates that any statfs system call on ext2fs will execute ext2_statfs function. On my UFS system I also noticed that stat +inode <filename> gives me some inode stats but they are not complete and works only when a filename is given. Used earlier ? Either a inode is in use or it is free, I don't think OSes keep track of inodes that are used earlier. A filesytem dump will have information about the used inodes. I hope this helps. Cheers, Aditya Sarawgi _______________________________________________ bsd-india mailing list [email protected] http://www.bsd-india.org/mailman/listinfo/bsd-india
