In a fit of irony, while preparing to burn a CDROM with some software I've been writing for about six months, I did a rm *>o instead of rm *.o on an ext3 filesystem. And I'm well aware that under normal circumstance you can't undelete, especially a ext3 filesystem. However, I need to at least *try* to recover this. I've built lde (linux disk editor) and if I can isolate a certain block, I can at least get the data off, since I've unmounted the partition. All my source files have a certain #include, so does anyone have an efficient way to read an unused block from an ext3 partition, check if a certain string is present, and if so return the block number? I've never deal with filesystem code (Just a scientific programmer) so if anyone has a skeleton set of code that I could use as a basis I would be most happy. -- Greg Hennessy gsh@usno.navy.mil 3450 Mass Ave NW Washington DC, 20392
On Mar 05, 2003 21:24 -0500, Greg Hennessy wrote:> In a fit of irony, while preparing to burn a CDROM > with some software I've been writing for about six months, > I did a rm *>o instead of rm *.o on an ext3 filesystem. > And I'm well aware that under normal circumstance you > can't undelete, especially a ext3 filesystem. However, > I need to at least *try* to recover this. I've built > lde (linux disk editor) and if I can isolate a certain block, > I can at least get the data off, since I've unmounted the partition. > All my source files have a certain #include, so does anyone > have an efficient way to read an unused block from an ext3 > partition, check if a certain string is present, and if so > return the block number? I've never deal with filesystem > code (Just a scientific programmer) so if anyone has > a skeleton set of code that I could use as a basis I would be > most happy.One possibility (probably good for perl programmers): dumpe2fs <dev> - use the " Free Blocks" lines dd bs=<blocksize> if=<dev> skip=<blocknum> | strings | grep "include ..." Cheers, Andreas -- Andreas Dilger http://sourceforge.net/projects/ext2resize/ http://www-mddsp.enel.ucalgary.ca/People/adilger/
msg Donnerstag 06 März 2003 07:42 by Andreas Dilger:> > a skeleton set of code that I could use as a basis I would be > > most happy. > > One possibility (probably good for perl programmers): > > dumpe2fs <dev> - use the " Free Blocks" lines > dd bs=<blocksize> if=<dev> skip=<blocknum> | strings | grep "include ..."you may also look into the archives for the thread data recovery openoffice.sx? on ext3-partition http://marc.theaimsgroup.com/?l=ext3-users&m=103113249312697&w=2 Regards -- . ___ | | | |