On Unix-like operating systems, the dd command copies a file, converting the format of the data in the process, according to the operands specified.
This page describes the GNU/Linux version of dd.
Syntax
dd [OPERAND]…
dd OPTION
Operands
Options
Numerical suffixes
BLOCKS and BYTES may be followed by the following multiplicative suffixes:
- Syntax
- Examples
- Related commands
- Linux commands help
c=1w=2b=512kB=1000K=1024MB=10001000M=10241024xM=MGB=100010001000G=102410241024
…and so on for T (terabytes), P (petabytes), E (exabytes), Z (zettabytes), and Y (yottabytes).
Examples
dd if=/dev/sr0 of=/home/hope/exampleCD.iso bs=2048 conv=noerror,sync
Create an ISO disc image from the CD in the computer.
Use dd cautiously — improper usage or entering the wrong values could inadvertently wipe, destroy, or overwrite the data on your hard drive.
dd if=/dev/sda of=~/disk1.img
Create an img file of the /dev/sda hard drive. To restore that image type: dd if=disk1.img of=/dev/sda
dd if=/dev/sda of=/dev/sdb
Copy the contents from the if= drive /dev/sda to the of= drive /dev/sdb.
Related commands
cp — Copy files and directories.fdisk — A disk partitioning utility.