Skip to content


Disk Dump, used for cloning disks, wiping data, copying blocks of data.

Tips and Tricks

Write random data

dd if=/dev/urandom of=/dev/hda

Write zeros

dd if=/dev/zero of=/dev/hda

Wipe a failed disk

If you can't use shred or ddrescue, this is a very slow but portable alternative

while true ; do
  echo "Writing block $i"
  dd if=/dev/zero of=/dev/sda count=1 bs=1 seek="$i"
  let i=i+1

Wipe first and last 1G of a hard disk

dd bs=4096 if=/dev/zero of=/dev/sdx count=256 seek=$(( $(blockdev --getsz /dev/sdx) - 256))