Please How do I calculate the offset of a file within a ext3 partition
William Tambe
tambewilliam at gmail.com
Mon Jul 23 01:07:31 UTC 2007
Thank you for your response, but one more question, does this logical
block 0 hold the header of the file, if not where is located the header
of a file in a ext3 filesystem.
The reason why I need to know that is because I wish to use swsusp on my
swap-file so I really need to know the location of the file's swap header.
Thank you for helping.
Sincerely,
William Tambe
Duane Griffin wrote:
> On 22/07/07, William Tambe <tambewilliam at gmail.com> wrote:
>> I need to understand and to calculate the offset of the beginning of a
>> file within my partition which uses an ext3 filesystem.
>>
>> Can I use dumpe2fs to figure that out, if yes how?
>
> (Sorry for the duplicate William, forgot to reply to the list)
>
> Not sure about dumpe2fs but you can use debugfs to do so. For example:
>
> /sbin/debugfs <fs> -R "bmap /path/to/file 0"
>
> Will give you the first physical block corresponding to logical block
> 0 of the file.
>
> Cheers,
> Duane.
>
More information about the Ext3-users
mailing list