ddis an abbreviation for "dataset definition". Its primary purpose is the low-level copying and conversion of raw data.
ddcan also be used to copy regions of raw device files or to read fixed amounts of data from special files like /dev/zero or /dev/urandom.
/dev/zero - a special file that provides as many null characters
/dev/urandom - a special file that serves as a true random number generator or as a pseudorandom number generator.
Example use of dd
1. Create an ISO Disk Image from a CD-ROM:
dd if=/dev/cdrom of=/home/myhome/my.iso bs=2048 conv=sync,notrunc
2. Destroy data on a partition with null data
#Do not execute this code on any computer unless you want to destroy all data on a partition!
dd if=/dev/zero of=/dev/
3. duplicate one hard disk partition to another hard disk
dd if=/dev/sda2 of=/dev/sdb2 bs=4096 conv=notrunc,noerror