Dd

is Article description::a utility used to copy raw data from source to sink, where source and sink can be a block device, file, or piped input/output.

Installation
As part of the GNU, is installed in any standard any Gentoo GNU/Linux system.

Emerge
In the event that coreutils goes missing:

Usage
By default takes input from, optionally manipulates the data, and writes to.

Examples
Some common tasks where is used:

Boot stick
This should work with any live media as long as the memory stick is large enough.


 * : Defines the source.
 * : Defines the sink.
 * : Defines the block size (amount of data read/written at a time). The default is 512 bytes but most modern devices can read/write much faster. It is possible to define different sizes for source and sink using  and.

Master boot record backup
To backup the master boot record (MBR), copy only the first 512 bytes:


 * : The number of blocks to copy.

Hard disk backup
To backup a complete hard disk or partition, it is necessary to boot the computer with into a Live CD environment (such as the Gentoo Minimal or Gentoo Admin disk).

The following example will backup a computer drive on to an external USB drive. To be able to mount that USB drive read/write, this example will use its label:

Not every file system includes a label. Using UUID values or verified disk paths are alternatives.

To create a backup:

To restore a backup:

Input manipulation
As an example, convert any upper case character in a file to lowercase and reverse the input per line, then pipe the output to to display the file:


 * : Revert the input per line by swapping any input byte (writing backwards).
 * : Convert any upper case letter to lower case. To convert lower case to upper case use.
 * : Continue if a read error occurs.