A low-level command-line tool on Unix-like operating systems to copy and convert files.
Ref
Examples:
Clone the drive sda onto drive sdb:
`$ dd if=/dev/sda of=/dev/sdb`
Clone the drive hda onto an image file:
`$ dd if=/dev/hda of=/image.img`
Copy a CD or DVD disc to a .iso image file, first unmounting the disc: sudo umount /dev/dvd-device
dd if=/dev/dvd-device of=dvd.iso bs=2048 conv=sync,notrunc
# dvd-device will typically be dvd for a dvd disc or cdrom for a cdrom disc.
Clone a hard drive to a zipped image file in 100Mb blocks:
$ dd if=/dev/hda bs=100M | gzip -c > /image.img
Create a 10 KB file filled with random data (10 x 1K blocks):
$ dd if=/dev/random of=random.bin bs=1024 count=10
Completely wipe the hard drive hdz by overwriting it with random data:
$ dd if=/dev/urandom of=/dev/hdz
Create a boot floppy:
$ dd if=boot.img of=/dev/fd0 bs=1440