2

Suppose I have a file /foo/bar. stat /foo/bar can show the inode information of it -- something like this:

  Size: 9511068     Blocks: 18584      IO Block: 4096   regular file
Device: ca01h/51713d    Inode: 793183      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2015-01-29 13:58:23.000000000 +0000
Modify: 2015-01-24 11:48:47.000000000 +0000
Change: 2015-01-29 14:01:09.177162834 +0000

But it doesn't show the addresses of each block of contents. How can I read the specific, say, the third block of the file /foo/bar? Is there any such command?

1 Answer 1

1

You can use debugfs command. Using it open the filesystem you want to inspect and there is a command blocks which shows you all block adresses used by a file. I am not sure if it works with filesystems other than ext family.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .