dd
Convert and copy files at the block level
TLDR
SYNOPSIS
dd [OPERAND]...
DESCRIPTION
dd converts and copies files at the block level, making it useful for low-level disk operations that bypass filesystem structures. It reads from standard input and writes to standard output by default, but is typically used with if= and of= operands to specify input and output files or devices.The tool operates in fixed block sizes (set with bs=), reading and writing data in chunks for efficiency. This block-oriented approach makes dd suitable for creating exact disk images, cloning entire drives, writing bootable USB drives from ISO files, and generating test files of specific sizes.Common use cases include forensic disk imaging, data backup and restoration, disk benchmarking, and creating files filled with zeros or random data. The status=progress option (added in GNU coreutils 8.24) provides real-time progress information. Sending a USR1 signal (or INFO signal on BSD) to a running dd process causes it to print I/O statistics to stderr.
PARAMETERS
if=FILE
Read from FILE instead of stdin.of=FILE
Write to FILE instead of stdout.bs=BYTES
Read and write up to BYTES bytes at a time (default: 512). Overrides ibs and obs.ibs=BYTES
Read up to BYTES bytes at a time (default: 512).obs=BYTES
Write BYTES bytes at a time (default: 512).count=N
Copy only N input blocks.skip=N
Skip N ibs-sized blocks at start of input.seek=N
Skip N obs-sized blocks at start of output.conv=CONVS
Comma-separated conversion options: ascii, ebcdic, ibm, block, unblock, lcase, ucase, sparse, swab, sync, excl, nocreat, notrunc, noerror, fdatasync, fsync.status=LEVEL
Output level: none (suppress everything except errors), noxfer (suppress transfer statistics), progress (show periodic transfer statistics).iflag=FLAGS
Comma-separated input flags: append, direct, directory, dsync, sync, fullblock, nonblock, noatime, nocache, noctty, nofollow, countbytes, skipbytes.oflag=FLAGS
Comma-separated output flags: append, direct, directory, dsync, sync, nonblock, noatime, nocache, noctty, nofollow, seek_bytes.
CAVEATS
Dangerous: dd will overwrite data without warning. Double-check the of= operand before executing. Using wrong device names can destroy entire disks. BYTES may be followed by multiplicative suffixes: c=1, w=2, b=512, kB=1000, K=1024, MB=1000000, M=1048576, and so on for G, T, P, E, Z, Y.
HISTORY
Part of GNU Coreutils. The command name comes from IBM JCL (Job Control Language) where DD stands for "Data Definition". Available since Version 5 AT&T Unix (1974).
