From owner-freebsd-questions@FreeBSD.ORG Mon Mar 4 11:39:10 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 56344726 for ; Mon, 4 Mar 2013 11:39:10 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 1F66A11D2 for ; Mon, 4 Mar 2013 11:39:09 +0000 (UTC) Received: from r56.edvax.de (port-92-195-109-47.dynamic.qsc.de [92.195.109.47]) by mx01.qsc.de (Postfix) with ESMTP id 211903D611; Mon, 4 Mar 2013 12:39:09 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id r24BdEXW084141; Mon, 4 Mar 2013 12:39:14 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Mon, 4 Mar 2013 12:39:14 +0100 From: Polytropon To: "Steve O'Hara-Smith" 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> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Mar 2013 11:39:10 -0000 On Mon, 4 Mar 2013 11:29:00 +0000, Steve O'Hara-Smith wrote: > On Mon, 4 Mar 2013 12:15:24 +0100 > Polytropon 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, ...