Date: Mon, 4 Mar 2013 12:39:14 +0100 From: Polytropon <freebsd@edvax.de> To: "Steve O'Hara-Smith" <steve@sohara.org> Cc: freebsd-questions@freebsd.org Subject: Re: Grepping though a disk Message-ID: <20130304123914.c18a9eb6.freebsd@edvax.de> In-Reply-To: <20130304112900.660b3e29dbec8f2f60fffa9b@sohara.org> References: <20130304013608.7981e8a9.freebsd@edvax.de> <51347454.5060605@gmail.com> <20130304121524.63685108.freebsd@edvax.de> <20130304112900.660b3e29dbec8f2f60fffa9b@sohara.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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@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, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130304123914.c18a9eb6.freebsd>