Date: Thu, 11 Mar 2004 12:19:44 +0100 From: Uwe Doering <gemini@geminix.org> To: freebsd-questions@freebsd.org Subject: Re: writing to specific block address Message-ID: <40504B50.9020900@geminix.org> In-Reply-To: <20040311072548.GA59124@falcon.midgard.homeip.net> References: <20040311055330.61918.qmail@web41702.mail.yahoo.com> <20040311072548.GA59124@falcon.midgard.homeip.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40504B50.9020900>