Linux Command Directory
This directory of Linux commands is from Linux in a Nutshell, 5th Edition.
Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
Make a copy of an input file (if) using the specified conditions, and send the results to the output file (or standard output if of is not specified). Any number of options can be supplied, although if and of are the most common and are usually specified first. Because dd can handle arbitrary block sizes, it is useful when converting between raw physical devices.
Set input and output block size to n bytes; this option overrides ibs and obs.
Set the size of the conversion buffer (logical record length) to n bytes. Use only if the conversion flag is ascii, ebcdic, ibm, block, or unblock.
Convert the input according to one or more (comma-separated) flags listed next. The first five flags are mutually exclusive.
EBCDIC to ASCII.
ASCII to EBCDIC.
ASCII to EBCDIC with IBM conventions.
Variable-length records (i.e., those terminated by a newline) to fixed-length records.
Fixed-length records to variable-length records.
Uppercase to lowercase.
Lowercase to uppercase.
Continue processing after read errors.
Don't truncate output file.
Swap each pair of input bytes.
Pad input blocks to ibs with trailing zeros.
Copy only n input blocks.
Set input block size to n bytes (default is 512).
Read input from file (default is standard input).
Set output block size to n bytes (default is 512).
Write output to file (default is standard output).
Skip n output-sized blocks from start of output file.
Skip n input-sized blocks from start of input file.
Print help message and then exit.
Print the version number and then exit.
You can multiply size values (n) by a factor of 1024, 512, or 2 by appending the letter k, b, or w, respectively. You can use the letter x as a multiplication operator between two numbers.
Convert an input file to all lowercase:
dd if=caps_file of=small_file conv=lcase
Retrieve variable-length data and write it as fixed-length to out:
[data_retrieval_cmd] | dd of=out conv=sync,block