Learn Linux DD Command - 15 Examples With All Options
Learn Linux DD Command - 15 Examples With All Options
Learn Linux DD Command - 15 Examples With All Options
All Options
June 24, 2011 | By Leena
The Linux command dd is one of the most powerful utility which can be used in
a variety of ways. This tool is mainly used for copying and converting data, hence
it stands for data duplicator.
This tool can be used for:
Backing up and restoring an entire hard drive or a partition.
Copy regions of raw device files like backing up MBR (master boot record).
Converting data formats like ASCII to EBCDIC.
Converting lowercase to uppercase and vice versa.
Creating files with fixed size.
Only superuser can execute this command. You should be very careful while
using this command as improper usage may cause huge data loss. So, some
people consider this tool as data destroyer.
Syntax of dd command.
dd if=<source file name> of=<target file name> [Options]
We will learn the various options while going through the examples.
everything from /dev/sda to /dev/sdb. So, this will clone the disk with the same
data on same partition.
a. Backing up MBR.
dd if=/dev/sda of=/tmp/mbr.img bs=512 count=1
The option count refers to the number of input blocks to be copied.
7 Examples To Delete/Erase Contents Of File In Linux But Not File
Linux Uptime Command Find How Long Your System Been Running