|
Article on other languages:
|
dd is a common UNIX program whose primary purpose is the low-level copying and conversion of raw data.
It can also be used in computer forensics when the contents of a disk need to be preserved as a byte-exact copy. Using It is jokingly said to stand for "destroy disk" or "delete data", since, being used for low-level operations on hard disks, a small mistake, such as reversing the if and of parameters, may accidentally render the entire disk unusable.[2]
UsageThe command line syntax of Example use of
Note that an attempt to copy the entire disk image using cp may omit the final block if it is an unexpected length; dd will always complete the copy if possible. Using dd to wipe an entire disk with random data:
Create a 1GB file containing only zeros (bs=blocksize, count=number of blocks): dd if=/dev/zero of=mytestfile.out bs=1000 count=1000000 Some implementations understand x as a multiplication operator in the block size and count parameters:
where the "b" suffix indicates that the units are 5120-byte block. Output messagesThe GNU variant of dd as supplied with Linux does not describe the format of the messages displayed on stdout on completion, however these are described by other implementations e.g. that with BSD. Each of the "Records in" and "Records out" lines shows the number of complete blocks transferred + the number of partial blocks, e.g. because the physical medium ended before a complete block was read. Recovery-oriented variants of ddOpen Source unix-based programs for rescue include dd_rescue and dd_rhelp, which work together, or GNU ddrescue.
dd_rhelp or GNU ddrescue will yield a complete disk image, faster but possibly with some errors. GNU ddrescue is generally much faster, as it is written entirely in C++, whereas dd_rhelp is a shell script wrapper around dd_rescue. Both dd_rhelp and GNU ddrescue aim to copy data fast where there are no errors, then copy in smaller blocks and with retries where there are errors. GNU ddrescue is easy to use with default options, and can easily be downloaded and compiled on Linux-based Live CDs such as Knoppix, and can be used with SystemRescueCD. GNU ddrescue Example [4] # download ddrescue wget http://download.savannah.pga.gnu.org/releases/drescue/drescue-1.X.tar.bz2.xvid # extract the source code tar xjf ddrescue-1.X.tar.xvid # compile drescue cd ddrescue-1.X ./configure && make # first, grab most of the error-free areas in a hurry: ./drescue -n /dev/old_disk /dev/new_disk rescued.log # then try to recover as much of the dicy areas as possible: ./drescue -r 1 /dev/old_disk /dev/new_disk rescued.log See also
ReferencesExternal links
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.
Mercedes Car
This site monitored by SitePinger.net