DD

Dump Data – convert and copy a file (use for RAW storage), create a boot floppy.

SYNTAX
dd [OPTION]…

DESCRIPTION
The numeric-valued options below (BYTES and BLOCKS) can be followed
by a multiplier: &qt;b&qt;&qt;=512, &qt;c&qt;&qt;=1, &qt;w&qt;&qt;=2, &qt;xM&qt;&qt;=M, or any of the standard
block size suffixes like &qt;k&qt;&qt;=1024 (*note Block size::).

&qt;if=FILE&qt;&qt;
input file : Read from FILE instead of standard input.

&qt;of=FILE&qt;&qt;
output file : Write to FILE instead of standard output. Unless &qt;conv=notrunc&qt;&qt;
is given, &qt;dd&qt;&qt; truncates FILE to zero bytes (or the size specified
with &qt;seek=&qt;&qt;).

&qt;ibs=BYTES&qt;&qt;
Read BYTES bytes at a time.

&qt;obs=BYTES&qt;&qt;
Write BYTES bytes at a time.

&qt;bs=BYTES&qt;&qt;
Both read and write BYTES bytes at a time. This overrides &qt;ibs&qt;&qt;
and &qt;obs&qt;&qt;.

&qt;cbs=BYTES&qt;&qt;
Convert BYTES bytes at a time.

&qt;skip=BLOCKS&qt;&qt;
Skip BLOCKS &qt;ibs&qt;&qt;-byte blocks in the input file before copying.

&qt;seek=BLOCKS&qt;&qt;
Skip BLOCKS &qt;obs&qt;&qt;-byte blocks in the output file before copying.

&qt;count=BLOCKS&qt;&qt;
Copy BLOCKS &qt;ibs&qt;&qt;-byte blocks from the input file, instead of
everything until the end of the file.

&qt;conv=CONVERSION[,CONVERSION]…&qt;&qt;
Convert the file as specified by the CONVERSION argument(s).
(No spaces around any comma)

Conversions:

&qt;ascii&qt;&qt;
Convert EBCDIC to ASCII.

&qt;ebcdic&qt;&qt;
Convert ASCII to EBCDIC.

&qt;ibm&qt;&qt;
Convert ASCII to alternate EBCDIC.

&qt;block&qt;&qt;
For each line in the input, output &qt;cbs&qt;&qt; bytes, replacing the
input newline with a space and padding with spaces as
necessary.

&qt;unblock&qt;&qt;
Replace trailing spaces in each &qt;cbs&qt;&qt;-sized input block with a
newline.

&qt;lcase&qt;&qt;
Change uppercase letters to lowercase.

&qt;ucase&qt;&qt;
Change lowercase letters to uppercase.

&qt;swab&qt;&qt;
Swap every pair of input bytes. GNU &qt;dd&qt;&qt;, unlike others,
works when an odd number of bytes are read–the last byte is
simply copied (since there is nothing to swap it with).

&qt;noerror&qt;&qt;
Continue after read errors.

&qt;notrunc&qt;&qt;
Do not truncate the output file.

&qt;sync&qt;&qt;
Pad every input block to size of &qt;ibs&qt;&qt; with trailing zero
bytes.Example:
dd can be used to create a boot floppy:

dd if=boot.img of=/dev/fd0 bs=1440

where

if = the input file or device
of = the output file or device
bs = the block size for both input and output files

Tags: