TOOL » LINUX » PACKAGE

Dd

Usage

shell
dd OPTIONS
OptionDescription
ifInput file.
ofOutput file.
bsRead and write up to SIZE at a time (default 512 bytes).
oflagWrite as per the comma separated symbol list.
countCopy only N input blocks.
statusInformation to print to stderr. none: only errors; noxfer: no final transfer statistics; progress: periodic transfer statistics.

Run sync at the end to be sure all data was written to the device (requires root).

Example

Write ISO into a drive (sudo needed):

shell
sudo dd if=linux.iso of=/dev/sda bs=4M
sudo sync

Benchmark write speed of a disk (for read speed use hdparm):

shell
dd if=/dev/zero of=ddfile oflag=direct bs=128k count=16k; rm ddfile  # Write 2GiB file