Data recovery.
    Duane Attaway 
    dattaway at dattaway.org
       
    Wed Jul  2 18:00:07 CDT 2003
    
    
  
NOTE:  This reply is also bottom posted (See, below.) in accordance with
long established and universally accepted customs:
On Wed, 2 Jul 2003, Jason Clinton wrote:
> jd0g wrote:
> 
> >If you are trying to recover text files you could always mount the
> >damaged HD in RO and raw copy (dd) to a new place and grep through the
> >data to extract what you need.  I guess it depends on how fragmented
> >your drive is.
> Correct me if I'm wrong but wouldn't that require some knowledge about
> sector headers and byte-offsets? The data on disk is stored different
> for every filing system. It would litterally look like a stream of ones
> and zeros. It would be very hard to make heads or tails of anything.
That is why the head and tail commands are integrated into grep with the
-A and -B options (see manpage.)  Once my laptop batteries failed and lost
a well researched email I was working on and did NOT want to type it over
again.  I did not save my work.
I simply grep'd the hard drive for a known unique string in my mail and
optioned for the previous and following 1000 lines after into a file.  
Fortunately, pico flushed its buffer every several seconds, so I only lost 
half of the last sentence I was working on.
It went something like this:
cat /dev/hda | grep -A 1000 -B 1000 "if I remember this right"
The nice thing about ext2fs (and ext3fs) is that if your hard drive isn't
too full, files automagically defrag themselves and flow nicely together.
--
http://dattaway.org    
    
    
More information about the Kclug
mailing list