I want to log the extents of each file recursively present in a ext4 image file. the physical location of files in ext4 image

Any tool i can use for this? or any script? debugfs gives each file extents separately when asked, but it wont display all files extents?

closed as unclear what you're asking by G-Man, Christopher, Mr Shunz, Stephen Kitt, Rui F Ribeiro May 10 at 11:57

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What do you mean? Please do not respond in comments; edit your question to make it clearer and more complete. – Scott May 9 at 5:36
  • the dump_extents command in debugfs? – mosvy May 9 at 8:49
  • OK, by ‘‘extent(s)’’ / ‘‘physical location’’, do you mean block numbers?  What do you mean by ‘‘log’’?  Please clarify what you mean by ‘‘recursive(ly)’’.  Hint: tools that do this will typically do a brute-force linear enumeration of a filesystem, examining every file without actually doing a recursive search. – G-Man May 9 at 23:22
  • @G-Man extents. To the OP: please explain your usage case and why debugfs(1) isn't enough -- notice that on Linux you can also get the device blocks allocated to a file with ioctl(FIBMAP) on most fs, and you can arrage to do that from a scripting language like perl. – mosvy May 10 at 4:58
  • 1
    If you've managed to solve the problem, please add your script as an answer, so that it may help other people having the same problem. – JigglyNaga May 10 at 10:20

Browse other questions tagged or ask your own question.