From owner-freebsd-questions@FreeBSD.ORG Thu Mar 11 03:19:48 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2ACB016A4CE for ; Thu, 11 Mar 2004 03:19:48 -0800 (PST) Received: from geminix.org (gen129.n001.c02.escapebox.net [213.73.91.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA3BA43D58 for ; Thu, 11 Mar 2004 03:19:47 -0800 (PST) (envelope-from gemini@geminix.org) Message-ID: <40504B50.9020900@geminix.org> Date: Thu, 11 Mar 2004 12:19:44 +0100 From: Uwe Doering Organization: Private UNIX Site User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040119 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <20040311055330.61918.qmail@web41702.mail.yahoo.com> <20040311072548.GA59124@falcon.midgard.homeip.net> In-Reply-To: <20040311072548.GA59124@falcon.midgard.homeip.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Received: from gemini by geminix.org with asmtp (TLSv1:AES256-SHA:256) (Exim 3.36 #1) id 1B1OE6-000Efi-00; Thu, 11 Mar 2004 12:19:47 +0100 Subject: Re: writing to specific block address X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2004 11:19:48 -0000 Erik Trulsson wrote: > On Thu, Mar 11, 2004 at 04:53:30PM +1100, eodyna wrote: > >>hello again, >> >>I dont know if this is possible, but does anyone know >>if you can write to a specific address in Freebsd? >> >>Say, i want to write to block 7946848-7946879. Can i >>do that, or is that something different? >> >>Thanks in advance . > > You should be able to do that using dd(1). Right. In case you would like access to the entire disk, regardless of the partitions and the various filesystems inside the partitions, use 'of=/dev/da0', 'of=/dev/ad0' or whatever device node is appropriate on your system. Offset and length would be set with 'seek=' and 'count='. However, make sure that you understand their interaction with 'bs=' (block size), or you may be very sorry afterwards ... Uwe -- Uwe Doering | EscapeBox - Managed On-Demand UNIX Servers gemini@geminix.org | http://www.escapebox.net