Grepping though a disk

Polytropon freebsd at edvax.de
Mon Mar 4 11:39:10 UTC 2013


On Mon, 4 Mar 2013 11:29:00 +0000, Steve O'Hara-Smith wrote:
> On Mon, 4 Mar 2013 12:15:24 +0100
> Polytropon <freebsd at edvax.de> wrote:
> 
> > But I don't know how to do this. From reading "man dd"
> > my impression (consistent with my experience) is that
> > the option skip= operates in units of bs= size, so I'm
> > not sure how to compose a command that reads units of
> > 1 MB, but skips in units of 950 kB. Maybe some parts of
> > my memory have also been marked "unused" by fsck. :-)
> 
> 	Not too hard (you'll kick yourself when you read down) - translation
> to valid shell script is left as an exercise for the reader :)
> 
>  bs=50k count=(n*20) skip=(n*20 - 1)
> 
> 	Probably nicer to use powers of 2
> 
> bs=64k count=(n*16) skip=(n*16 - 1)

Thanks for the pointer. I was so concentrated on finding
the answer within dd that I hadn't thought about that.
It's easy to write this in shell code. As a conclusion,
I will apply for further IQ reduction, seems that I have
enough spare brain power I don't use anyway. :-)



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


More information about the freebsd-questions mailing list