Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: The dd command.  (Read 2548 times)

0 Members and 1 Guest are viewing this topic.

akhils

  • Guest
The dd command.
« on: November 20, 2013, 10:41:27 pm »
Kindly refer below for more on "dd" command.

dd - Disk Dump

How to use dd command ?

1.  Create an empty file of 650MB size.

#dd if=/dev/zero of="empty_file" bs=1024k count=650


2. To Create ISO from CD OR DVD

#dd if=/dev/cdrom of=file.iso


3. Create an exact image of this floppy-disk by issuing the command

#dd if=/dev/fd0 of=floppy.img


4. Create backup of HDD or partition

#dd if=/dev/sdb of=backup.dd


5. Creating backup of one hardisk in to second HDD.

#dd if=/dev/sda of=/dev/sdb


6. How to take backup of only MBR and MBR + Partition Table;

#dd if=/dev/sda of=mbr.bak bs=1 count=446 (Backup only MBR)

#dd if=/dev/sda of=mbr_part.bak bs=1 count=512 (Backup MBR + Partition Table)

   To restore,

#dd if=mbr.bak of=/dev/sda bs=1 count=446 (Restore only MBR)

#dd if=mbr_part.bak of=/dev/sda bs=1 count=512 (Backup only MBR)


7. To wipe the hard disk completely,

#dd if=/dev/zero of=/dev/sda