Help! dd is scary!
You are not alone. From tips for Linux:
The ' dd ' command is one of the original Unix utilities and should be in everyone's tool box... Some people believe dd means "Destroy Disk" or "Delete Data" because if it is misused, a partition or output file can be trashed very quickly. Since dd is the tool used to write disk headers, boot records, and similar system data areas, misuse of dd has probably trashed many hard disks and file systems.
But worry ye not. Once you learn of its intricacies you'll be invoking dd with the calm grace of a rodeo cowboy.
Will it break? What's this counting bs?
Let's deal with the first question first.
How can we now subtly break things by choosing a bad combination of bs and count? How would we know?
If you mean 'unintended consequences' by 'break', then just by specifying them, in theory. What do I mean by that? Well, lets say you want to copy image.img onto an SD card located at /dev/sdc. So you match the parameters in your example:
# dd if=/home/someone/image.img of=/dev/sdc bs=64M count=16
Should be fine to reuse those settings right? Let's just wait for dd to finish... now, what's it saying?
16+0 records in
16+0 records out
1073741824 bytes (1.1 GB) copied, 34.1303 s, 31.5 MB/s
Only 1.1 GB copied! But image.img is 2GB or so, I want the whole thing copied! By telling dd to copy 16 lots of 64M (where M=1024*1024, incidentally) you've specified a size. You would know by the status output. If you want to copy the whole file, either match the size with bs and count; or just omit those entirely:
# dd if=/home/someone/image.img of=/dev/sdc
4364864+0 records in
4364864+0 records out
2234810368 bytes (2.2 GB) copied, 45.9502 s, 48.6 MB/s
What happens if we get really naughty and tell dd to copy more data than is available?
# dd if=/home/someone/image.img of=/dev/sdc bs=1M count=4096
2131+1 records in
2131+1 records out
2234810368 bytes (2.2 GB) copied, 77.9768 s, 28.7 MB/s
Ah, dd only copies as many bytes as it receives. That's handy.
Monitoring dd
Speaking of status output, dd (GNU variant) respects and responds to the INFO signal SIGUSR1:
# echo "In another terminal or TTY"
# pkill -USR1 -n -x dd
# echo "Printed to stdout on the terminal/tty running dd:"
534+0 records in
534+0 records out
559939584 bytes (560 MB) copied, 1.68414 s, 332 MB/s
Handy for keeping an eye on a transfer which is slow or you expect to hang for some reason. Pairs nicely with watch, but be sure to give watch a reasonably long interval time.
Does dd have any other options I should know about?
dd does indeed have other options, but in most cases if you need to use them you will know what they do. Still, a few examples might give you an idea:
conv=CONVS: convert the input as per one or more conversion options
seek=N and skip=N: skip N [obs|ibs]-sized blocks at start of [output|input]
status=X: (suppress output) either noxfer or none
I'm feeling much better about dd now!
Great! In no time you will be sending a bootable image across the internet to be written straight to a microSD card using a combination of dd and ssh.
But what does the dd acronym actually stand for?
A good last question. For that question and any others like it, I'll refer you to the jargon file entry for dd.
Feel encouraged to ask for clarification if anything is more opaque than it should be!