hi everyone, --- Seth Arnold <sarnold@wirex.com> wrote: > On Fri, Jun 14, 2002 at 05:05:32PM -0700, Karthik > > Indeed, ls can't show you everything. I suggest > looking at the stat(2) > system call for some ideas on easily available > information. To get this > information from the kernel, look at the struct > inode structure, defined > in include/linux/fs.h. The block information is > located within the union > u that contains roughly 27 filesystem specific > information; the on-disk > layout is specific to the filesystem, so you'll have > to read the > specific structures for the filesystems you are > interested in. > > Note that with the md driver, or hardware raid > devices the block number > is going to be a logical block number; the specific > block devices may > assing the data to other blocks on the device. > (Standard IDE and SCSI > devices also feel free to remap blocks around the > device to work around > errors, but I don't think the kernel is in charge of > those changes, > though I think the SMART standard can help the > kernel figure out some > information about the devices.) > > I hope this helps you find what you need. Thanks Seth, that really helped me in figuring out the way to get all the details that I wanted. Thanks Manoj for the link but I was not able to figure out which command gives me all the details including the block addresses. The struct inode {} has all the details but I am not able to retrieve the contents for the specific inode for which i need the details. I came across this system call namei() prototype is : int namei(const char * pathname, struct inode ** result_node) This gives me the details of the inode of a specific file whose path is "pathname". I am not able to use this sys.call and when i checked the source codes I am not able to find the system call namei() at all. Has anyone used this sys.call or have come across this system call ?? this solves my entire problem as i just need to pass the path name to it and it puts the result into the result_node structure from where i can access all the details needed. Thanks for all your replies Karthik __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/