I'm trying to recover some files deleted from a Linux ext3 partition. I've grepped the raw partition device (/dev/sda1) using grep -b and it gave me an offset. What's the easiest way for me to read a chunk of data from that block device starting from the offset returned by grep?

link|improve this question

36% accept rate
feedback

1 Answer

up vote 1 down vote accepted

With dd: set the block size to 1k to simplify the math, then skip that number of blocks to (just before) the offset and copy however many count of blocks you think you might need, using the partition as the input file, to an output file:

dd if=/dev/sda1 of=recovery_file bs=1k skip=4321 count=20
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.