dd - disk destroyer

Intro

Known as "Disk Destroyer" since its interface allows you to unintentionally ruin entire hard drives. While infamous, dd is also very convenient.

End-of-day, dd simply writes the input file into the output file.

Examples

Create a bootable flashdrive from a .iso

sudo dd if=./debian-11.6.0-amd64-netinst.iso of=/dev/sdc status=progress
  • status=progress makes dd output the total bytes copied to the flashdrive in real-time

Create a file with random data

sudo dd if=/dev/random of=./random.dat bs=2048 count=1
  • bs is the size of each block to copy
  • count the number of blocks to copy
  • 2048 * 1 = 2kb

See Also

beefslab