Uhh…
dd is not like any disk-whatever software of any system. It can work on disks
only because the operating system exposes them as files and the user is passing the name of those files to
dd. So can literally any other piece of software if it has no specific requirements about file characteristics. The feature is in the Unix-inspired operating systems, not in
dd.
dd is associated with disk for cultural rather than technical reasons. When ancient dinosaurs were still inhabiting Earth, many other tools were not binary safe and so users had to resolve to using any program not mangling binary data. Old habits die hard and this is the only reason
dd is still used for that purpose.
(1) In 2020 not only
dd rarely offers advantage over e.g.
cat, but it’s harmful. The manual casually fails to clearly mention what
dd actually does. If you think you know, take a simple test: what will this command do?
dd if=10mebibyte-file of=destination bs=1M count=10
Is you answer: copies 10MiB (10·1M) from “10mebibyte-file” to “destination”? If yes, you have failed the test.
dd performs a
read from
if into a buffer of
bs bytes and then performs a
write of the same size as the read into
of. Repeats
count times. The fine print: the buffer is
bs bytes, not the number of bytes read. The number of bytes transferred in a block may be smaller — even zero. It will not re-read to fill the block to the full size before writing it. Which means that it may as well write 10 times nothing. And yes: that does happen and did lead to data corruption/loss.
To somewhat remedy the issue,
dd from GNU Coreutils is nice enough to at least scream at you if that occurs printing “dd: warning: partial read”. It also has a non-standard flag for
iflag to force the program to attempt re-reads until a full block is collected:
fullblock. But both of those are non-standard features specific to that very version. Even with GNU’s implementation there is usually no reason to take the risk unless you really need something found only in
dd.
Therefore: stop perpetuating promotion of
dd for copying data and associating it with disks.
____
(1) There are some jobs in which various features of
dd may be useful, but nearly all uses you find in suggestions on the internet are not among those tasks.