You are on page 1of 2

s a command-line utility for Unix, Plan 9, Inferno, and Unix-like operating systems and beyond, 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; 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]

History

In 1974, the dd command appeared as part of Version 5 Unix. According to Dennis Ritchie, the name 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][6] According to Douglas McIlroy, dd was "originally intended for converting files between
the ASCII, little-endian, byte-stream world of DEC computers and the EBCDIC, big-endian, blocked world of IBM";
thus, explaining the cultural context of its syntax.[7] Eric S. Raymond believes "the interface design was clearly a
prank", due to the command's syntax resembling a JCL statement more than other Unix commands do.[4]

In 1987, the dd command is specified in 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.[8]

In 1990, David MacKenzie announces GNU fileutils (now part of coreutils) which includes the dd command;[9] it
was written by Paul Rubin, David MacKenzie, and Stuart Kemp.[10] Since 1991, Jim Meyering is its
maintainer.[11]

In 1995, Plan 9 2nd edition is released; its dd command interface is redesigned to use a traditional command-line
option style instead of a JCL statement style.[12]

Since at least 1999,[13] there's UnxUtils, a native Win32 port for Microsoft Windows using GNU fileutils.[14]

dd is sometimes humorously called "Disk Destroyer", due to its drive-erasing capabilities involving typos.[15]

Usage

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.[8]
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).

You might also like