On Thu, 02 Apr 2009 13:36:24 +0200 Gabriel <dun...@dreams.sk> wrote: > Hello, > I have to write linux application that will analyze disk/partition > (ext3 filesystem) on really low level. It has to find/analyze files > on the disk by reading disk blocks to analyze file's headers to find > out file type and then blocks related to file to get file content. > The second part have to be searching deleted files by this blocks > reading (is this even possible?) > > Can i do this in python? For example can i open disk image file and > read it block by block? > Or is there even better solution? .) I tried search web but I wasn't > successful.. > > I will appreciate any help. Thank you in advice.. >
Searching for "ext3 recovering deleted files" has this as one of the results: http://projects.izzysoft.de/trac/ext3undel/ That said, if you want to read the disk, you can simply open the appropriate device (maybe one of the /dev/[hs]d*) and read it. You'll need root access, and knowledge of the on-disk layout of the filesystem. Also, writing to the wrong place into this file can badly mess up your filesystem, or even partition table. A good backup of the entire disk is a very good idea. -- kushal -- http://mail.python.org/mailman/listinfo/python-list