Grepping though a disk

Steve O'Hara-Smith steve at sohara.org
Mon Mar 4 11:29:32 UTC 2013


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)

-- 
Steve O'Hara-Smith <steve at sohara.org>


More information about the freebsd-questions mailing list