Re: dd if=/dev/rdisk12 of=/dev/zero (OT, since macOS)

From: Christoph Kukulies <kuku_at_kukulies.org>
Date: Sat, 01 Nov 2025 14:38:47 UTC
No no, direction is intentionally read. I just want to read the disk once to get the exact count of bytes and see its integrity.




Christoph Kukulies
kuku@kukulies.org



> Am 01.11.2025 um 15:32 schrieb Odhiambo Washington <odhiambo@gmail.com>:
> 
> 
> 
> On Sat, Nov 1, 2025 at 5:10 PM Christoph Kukulies <kuku@kukulies.org <mailto:kuku@kukulies.org>> wrote:
>> Hi co-readers,
>> 
>> excuse me for coming up with a non FreeBSD question but I'm sure many "also macOS" users are here.
>> I got an SSD external drive today from China. It's supposed to have 10TB and has the name "SEAGATE" engraved on the cover which I haven't opened
>> yet, also because it's clipped together - no screws.
>> 
>> Anyway, I tried
>> 
>> 
>> # dd if=/dev/rdisk12 of=/dev/zero
>> 
>> on it (in a macOS terminal window.
>> 
>> I'm getting 
>> 
>> $ sudo dd if=/dev/rdisk12 of=/dev/zero bs=512
>> Password:
>> dd: /dev/rdisk12: Invalid argument
>> 0+0 records in
>> 0+0 records out
>> 0 bytes transferred in 0.000036 secs (0 bytes/sec)
>> $ 
>> 
>> also without the bs=512 not any better.
>> 
>> An ideas what might be wrong?
> 
> You want to wipe the disk, right? So, you write zeros to the raw device, not the other way round.
> So it should be something like this:
> 
> dd if=/dev/zero of=/dev/rdisk12   bs=16M count=1000 status=progress
> 
> 
> 
> --
> Best regards,
> Odhiambo WASHINGTON,
> Nairobi,KE
> +254 7 3200 0004/+254 7 2274 3223
>  In an Internet failure case, the #1 suspect is a constant: DNS.
> "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
> [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]