The unix dd page on wikipedia removed the abundant examples at some point in time. (It's an encyclopedia, not a howto, so it makes sense.) Anyways, I copied the example part from the history, and pasted it here to keep the reference. There were some non-absolute links that got copied along, I'll clean those up when I feel like it.
Note: Read the man page for your dd command before trying examples as your system may be different. These examples are for Linux: on other platforms the device names may be different and have different semantics. You must still adjust the commands to your platform. Make sure the if (source) and of (target) is specified correctly, or you may lose data.
dd if=/dev/cdrom of=image.iso bs=2k
dd if=/dev/fd0 of=floppy.img
dd if=floppy.img of=/dev/fd0 bs=18k
dd if=/dev/random of=reallylargefile count=2M
dd if=/dev/urandom of=reallylargefile count=2M
dd if=/dev/urandom of=reallylargefile count=256k obs=4096
dd if=/dev/zero of=virtualpartition bs=1M count=10k
mke2fs virtualpartition
(reply yes when it says it's not a block device)mkdir /mnt/virtual
mount -o loop virtualpartition /mnt/virtual/
dd if=/dev/zero of=sparsefile.img bs=1 seek=10G count=0
dd if=/dev/hda1 of=partitionone
dd if=/dev/hda of=/dev/hdb
For many more examples of the Linux dd command, which is the same as the UNIX version, go here: http://www.linuxquestions.org/questions/showthread.php?t=362506
dd is available with the GNU Unix Utils.
Windows devices are named like \.\PhysicalDrive0 or \.\CDROM0.
To turn a CD into an ISO image:
dd if=\.\CDROM0 of=cdimage.iso obs=2048
dd is also available within Cygwin (www.cygwin.com)
The CD-Rom is typically available as /dev/scd0 (first SCSI-device).
To turn a CD into an ISO image do
dd if=/dev/scd0 of=cdimage.iso obs=2048
To turn a 3½" floppy into an image file do
Mount the floppy
mount -f -b //./a: /dev/fd0
Create the image
dd if=/dev/fd0 of=fdimage.img count=1 bs=1440k
Unmount the floppy
umount /dev/fd0
The following examples are provided to warn about the dangers of dd, if used incorrectly. Trying any of these commands with the proper privileges will almost certainly result in major data loss, and may make the system unusable. In order to prevent accidental copying and pasting, "dd" has been replaced with "[dd]" here.
This overwrites the complete first hard disk with null bytes, erasing it (though not in a manner that is as secure as overwriting with random data):
[dd] if=/dev/zero of=/dev/hda
This overwrites the first few blocks of the first hard disk with the file, resulting in a loss of the partition table:
[dd] if=funnysong.mp3 of=/dev/hda
This will completely corrupt an entire hard disk (/dev/dsp is the sound player/recorder):
[dd] if=/dev/dsp of=/dev/hda
This will overwrite an entire disk with pseudorandom data, making its initial contents unrecoverable outside a clean room in a hard drive forensics laboratory, and probably unrecoverable there as well.
[dd] if=/dev/urandom of=/dev/hda
The examples above presume device names (valid on some Linux systems) that may be different on other platforms. Here are some common variations.
Mac OS X:
[dd] if=/dev/zero of=/dev/disk0
Minix:
[dd] if=/dev/zero of=/dev/c0d0p0
NetBSD/OpenBSD (does not work if securelevel > 1):
[dd] if=/dev/zero of=/dev/rwd0