Dd

dd is 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, it should be already installed with any Gentoo GNU/Linux system.

Usage
The program takes input from, optional manipulates the data and writes to per default.

Examples
Some common tasks where dd is used:

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


 * if - defines the source
 * of - defines the sink
 * bs - block size - defines the amount of data read/written at a time, 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 ibs and obs.

Backup MBR
To backup the MBR partition table, dd can be told to only copy the first 512 bytes:


 * count - is the number of blocks to copy

Manipulate input
As an example we convert any upper case character in a file to lowercase and reverse the input per line, then pipe the default stdout to to display the file:


 * conv=swab - this will revert the input per line by swapping any input byte (writing backwards)
 * conv=lcase - convert any upper case letter to lower case, the opposite is ucase
 * conv=noerror - continue if a read error occurs

External resources

 * man pages for dd