Sunday, July 10, 2011

How to use Linux DD (Data Destroyer) command

Syntax:


dd if= of= bs=skip= seek= conv=


bs = "USUALLY" some power of 2, and usually not less than 512 bytes (ie, 512, 1024, 2048, 4096, 8192, 16384, but can be any reasonable whole integer value.) 


Example:
This command will backup the existing drive


Plug the external drive into the USB port, and boot with The Knoppix live CD. Launch a terminal. :


dd if=/dev/hda of=/dev/sda bs=64k conv=notrunc,noerror



This series will make a DVD backup of hard drive partition:


dd if=/dev/hda3 of=/home/sam/backup_set_1.img bs=1M count=4430 
dd if=/dev/hda3 skip=4430 of=/home/sam/backup_set_2.img bs=1M count=4430  
dd if=/dev/hda3 skip=8860 of=/home/sam/backup_set_3.img bs=1M count=4430




This command will overwrite the drive with zeroes
dd if=/dev/zero of=/dev/sda bs=4k conv=notrunc




No comments:

Post a Comment