suppose /dev/hda is the device for your harddrive, and you want the image in /var/tmp/hda.img do:
#>dd if="/dev/hda" of="hda.img" bs=512
if -> input file
of -> output file
bs -> blocksize in byte (I think 512 is the standard harddisk blocksize).
You could, I guess, leave out the bs=512. There's also another parameter "count" which says how many blocks of size "bs" you want to copy.
#>dd if=/dev/hda of=/var/tmp/hda.1st bs=512 count=1 would copy the first block of that drive to a file. Useful for storing the partition table and such as backup.
Just don't confuse if and of, that would be pretty desasterous.
--
Tars Tarkas, Holder of Opinions and Views, Giver of no guarantees. |