From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg.freemyer@gmail.com (Greg Freemyer) Date: Mon, 21 Feb 2011 00:43:47 -0500 Subject: How to verify block numbers of file ? In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Sun, Feb 20, 2011 at 9:02 AM, Abhijit Hoskeri wrote: > On Sun, Feb 20, 2011 at 6:52 PM, kashish bhatia wrote: >> Is there any method/command/utility to know what are the block numbers which >> are allocated to a file in ext2 fs? >> > > The FIBMAP ioctl gives you the block number give an integer, which is > the nth block attached to the inode. It includes blocks allocated to > store indirect blocks too. > > -Abhijit hdparm has a FIBMAP argument iirc. I've never used it. Greg