Linux dd commandcreate dummy 10meg file named 10M in the current directory
dd if=/dev/zero of=10M bs=1048576 count=10
create ISO from CD
dd if=/dev/scd0 of=image.iso
Backup image of bad partitionIf you have a tape drive or a suitably large extra disk drive you can
make an "image" backup of this device before you try any other (more
radical) attempts at data recovery. You'd just use a command like:
dd if=/dev/hda2 of=/dev/nst0
or better:
dd if=/dev/hda | buffer /dev/st0
to backup the entire drive through the "buffer" program to stream all of the data out to your SCSI tape drive.
You can write the image to another block device, such as hdc3 using a command like:
dd if=/dev/hda of=/dev/hdc3
(Assuming you have a large enough blank partition on the extra or loaner drive.)
You can even send the data to another system with a command like:
dd if=/dev/hda | rsh $othersystem dd of=/dev/hdc3
|