Dd

dd is used to copy raw data from source to sink, where source can be block device, files or piped input.

Installation
dd is part of the GNU and should be already installed with any Gentoo GNU/Linux system.

Usage
The program takes input from stdin, optional manipulates the data and writes to stdout 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 512byte but most modern devices can read/write much faster. It is possible to define different sizes for souce and sink using -ibs and -obs.

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


 * 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 during transfer:


 * 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