dd Essentials

Linux Logo

Basic Command

dd if=/input/file of=/output/file

Show Status

dd status=progress if=/input/file of=/output/file
6246367232 bytes (6.2 GB, 5.8 GiB) copied, 318 s, 19.7 MB/s

Size bs

dd bs=1M if=/dev/zero of=/output/file
bs=BYTES read and write up to BYTES bytes at a time (default: 512);

N and BYTES may be followed by the following multiplicative suffixes:
c =1, w =2, b =512, kB =1000, K =1024, MB =10001000, M =10241024, xM =M,
GB =100010001000, G =102410241024, and so on for T, P, E, Z, Y.

Count Repetition

dd bs=1M count=1024 if=/dev/zero of=/output/file
Above will result in /output/file being 1GB = (1MB x 1024)