Home »

Dd (unix)

The meaning of «dd (unix)»

dd is a command-line utility for Unix and Unix-like operating systems, the primary purpose of which is to convert and copy files.[1]

On Unix, device drivers for hardware (such as hard disk drives) and special device files (such as /dev/zero and /dev/random) appear in the file system just like normal files; .mw-parser-output .monospaced{font-family:monospace,monospace}dd can also read and/or write from/to these files, provided that function is implemented in their respective driver. As a result, dd can be used for tasks such as backing up the boot sector of a hard drive, and obtaining a fixed amount of random data. The dd program can also perform conversions on the data as it is copied, including byte order swapping and conversion to and from the ASCII and EBCDIC text encodings.[2]

The name dd is an allusion to the DD statement found in IBM's Job Control Language (JCL),[3][4] in which it is an abbreviation for "Data Definition".[5] The command's syntax resembles a JCL statement more than other Unix commands do, so much that Eric S. Raymond says "the interface design was clearly a prank".[3] The interface is redesigned in Plan 9's dd command to use a command-line option style.[6] dd is sometimes humorously called "Disk Destroyer", due to its drive-erasing capabilities.[7]

Originally intended to convert between ASCII and EBCDIC, dd first appeared in Version 5 Unix.[8] The dd command is specified since the X/Open Portability Guide issue 2 of 1987. This is inherited by IEEE Std 1003.1-2008 (POSIX), which is part of the Single UNIX Specification.[9]

The version of dd bundled in GNU coreutils was written by Paul Rubin, David MacKenzie, and Stuart Kemp.[10]

The command line syntax of dd differs from many other Unix programs. It uses the syntax option=value for its command-line options rather than the more standard -option value or --option=value formats. By default, dd reads from stdin and writes to stdout, but these can be changed by using the if (input file) and of (output file) options.[9]

Certain features of dd will depend on the computer system capabilities, such as dd's ability to implement an option for direct memory access. Sending a SIGINFO signal (or a USR1 signal on Linux) to a running dd process makes it print I/O statistics to standard error once and then continue copying. dd can read standard input from the keyboard. When end-of-file (EOF) is reached, dd will exit. Signals and EOF are determined by the software. For example, Unix tools ported to Windows vary as to the EOF: Cygwin uses Ctrl+D (the usual Unix EOF) and MKS Toolkit uses Ctrl+Z (the usual Windows EOF).

The non-standardized parts of dd invocation vary among implementations.

On completion, dd prints to the stderr stream about statistics of the data transfer. The format is standardized in POSIX.[9](STDERR) The manual page for GNU dd does not describe this format, but the BSD manuals do.

Related Searches

Df (Unix)Du (Unix)Dc (computer program)
© 2015-2021, Wikiwordbook.info
Copying information without reference to the source is prohibited!
contact us mobile version