writing to specific block address

Uwe Doering gemini at geminix.org
Thu Mar 11 03:19:48 PST 2004


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 at geminix.org  |  http://www.escapebox.net


More information about the freebsd-questions mailing list