Grepping though a disk

Polytropon freebsd at
Mon Mar 4 09:58:47 UTC 2013

On Mon, 4 Mar 2013 10:09:50 +0100, Damien Fleuriot wrote:
> Hey that's actually a pretty creative way of doing things ;)

It could be more optimum. :-)

My thought is that I could maybe use a better bs= to make
the whole thing run faster. I understand that for every
unit, a subprocess dd | grep is started and an if [] test
is run. Maybe doing this with 1 MB per unit would be better?
Note that I need to grep through 1 TB in 10 kB steps...

> Just to make sure, you've stopped daemons and all the stuff
> that could potentially write to the drive and nuke your
> blocks right ?

Of course. The /dev/ad6 disk is a separate data disk which
is not in use at the moment (unmounted). Still it is possible
that the block has already been overwritten, but when the
search has finished, it's almost certain in what state the
data is.

I would rewrite the file, but my eidetic memory is not working
well anymore, so I can only remember parts of it... :-(

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list