DD(1)

πŸ’– DD(1) β€” the copy-and-convert bestie πŸ’–

okay so real talk: this is the manual page for dd, living in the General Commands Manual section (section 1, obviously, we stay iconic here). and yeah she's uutils coreutils, so that's the whole vibe.


✨ NAME ✨

dd β€” Copy, and optionally convert, a file system resource πŸ¦‹

πŸŽ€ SYNOPSIS πŸŽ€

dd [OPERAND]...
dd OPTION

πŸ’… DESCRIPTION πŸ’…

Copy, and optionally convert, a file system resource. that's literally it. that's the whole girl. she copies, she converts if you want, she serves πŸ’–

πŸ”₯ OPTIONS πŸ”₯

  • -h, --help β€” Print help. yes bestie, the classic.
  • -V, --version β€” Print version.
  • [operands] β€” the actual operands, and there are so many of them, keep reading πŸ‘‘

🌈 EXTRA 🌈

✨ Operands ✨

  • bs=BYTES β€” read and write up to BYTES bytes at a time (default: 512); overwrites ibs and obs. she overrides them, no discussion πŸ’€
  • cbs=BYTES β€” the 'conversion block size' in bytes. Applies to the conv=block, and conv=unblock operations.
  • conv=CONVS β€” a comma-separated list of conversion options or (for legacy reasons) file flags.
  • count=N β€” stop reading input after N ibs-sized read operations rather than proceeding until EOF. See iflag=count_bytes if stopping after N bytes is preferred.
  • ibs=N β€” the size of buffer used for reads (default: 512).
  • if=FILE β€” the file used for input. When not specified, stdin is used instead.
  • iflag=FLAGS β€” a comma-separated list of input flags which specify how the input source is treated. FLAGS may be any of the input-flags or general-flags specified below.
  • skip=N (or iseek=N) β€” skip N ibs-sized records into input before beginning copy/convert operations. See iflag=seek_bytes if seeking N bytes is preferred.
  • obs=N β€” the size of buffer used for writes (default: 512).
  • of=FILE β€” the file used for output. When not specified, stdout is used instead.
  • oflag=FLAGS β€” comma separated list of output flags which specify how the output source is treated. FLAGS may be any of the output flags or general flags specified below.
  • seek=N (or oseek=N) β€” seeks N obs-sized records into output before beginning copy/convert operations. See oflag=seek_bytes if seeking N bytes is preferred.
  • status=LEVEL β€” controls whether volume and performance stats are written to stderr.

When unspecified, dd will print stats upon completion. An example is below. πŸ‘‡

6+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 0.00057009 s,
14.4 MB/s

The first two lines are the 'volume' stats and the final line is the 'performance' stats. The volume stats indicate the number of complete and partial ibs-sized reads, or obs-sized writes that took place during the copy. The format of the volume stats is <complete>+<partial>. If records have been truncated (see conv=block), the volume stats will contain the number of truncated records.

Possible LEVEL values are:

  • progress : Print periodic performance stats as the copy proceeds.
  • noxfer : Print final volume stats, but not performance stats.
  • none : Do not print any stats.

Printing performance stats is also triggered by the INFO signal (where supported), or the USR1 signal. Setting the POSIXLY_CORRECT environment variable to any value (including an empty value) will cause the USR1 signal to be ignored.

🫢 fr fr, remember that POSIXLY_CORRECT thing β€” any value, even an empty one, and USR1 just gets ignored, periodt.

🧚 Conversion options 🧚

  • ascii β€” convert from EBCDIC to ASCII. This is the inverse of the ebcdic option. Implies conv=unblock.
  • ebcdic β€” convert from ASCII to EBCDIC. This is the inverse of the ascii option. Implies conv=block.
  • ibm β€” convert from ASCII to EBCDIC, applying the conventions for [, ] and ~ specified in POSIX. Implies conv=block.
  • ucase β€” convert from lower-case to upper-case.
  • lcase β€” convert from upper-case to lower-case.
  • block β€” for each newline less than the size indicated by cbs=BYTES, remove the newline and pad with spaces up to cbs. Lines longer than cbs are truncated.
  • unblock β€” for each block of input of the size indicated by cbs=BYTES, remove right-trailing spaces and replace with a newline character.
  • sparse β€” attempts to seek the output when an obs-sized block consists of only zeros.
  • swab β€” swaps each adjacent pair of bytes. If an odd number of bytes is present, the final byte is omitted.
  • sync β€” pad each ibs-sided block with zeros. If block or unblock is specified, pad with spaces instead.
  • excl β€” the output file must be created. Fail if the output file is already present.
  • nocreat β€” the output file will not be created. Fail if the output file is not already present.
  • notrunc β€” the output file will not be truncated. If this option is not present, output will be truncated when opened.
  • noerror β€” all read errors will be ignored. If this option is not present, dd will only ignore Error::Interrupted.
  • fdatasync β€” data will be written before finishing.
  • fsync β€” data and metadata will be written before finishing.

🌸 Input flags 🌸

  • count_bytes β€” a value to count=N will be interpreted as bytes.
  • skip_bytes β€” a value to skip=N will be interpreted as bytes.
  • fullblock β€” wait for ibs bytes from each read. zero-length reads are still considered EOF.

πŸŽ€ Output flags πŸŽ€

  • append β€” open file in append mode. Consider setting conv=notrunc as well.
  • seek_bytes β€” a value to seek=N will be interpreted as bytes.

πŸ‘‘ General flags πŸ‘‘

  • direct β€” use direct I/O for data.
  • directory β€” fail unless the given input (if used as an iflag) or output (if used as an oflag) is a directory.
  • dsync β€” use synchronized I/O for data.
  • sync β€” use synchronized I/O for data and metadata.
  • nonblock β€” use non-blocking I/O.
  • noatime β€” do not update access time.
  • nocache β€” request that OS drop cache.
  • noctty β€” do not assign a controlling tty.
  • nofollow β€” do not follow system links.

⭐ VERSION ⭐

v(uutils coreutils) 0.12.0

πŸ’œ EXAMPLES πŸ’œ

Make a bootable USB drive from an isohybrid file (such as archlinux-xxx.iso) and show the progress:

dd if=path/to/file.iso of=/dev/usb_drive status=progress

Clone a drive to another drive with 4 MiB block size and flush writes before the command terminates:

dd bs=4194304 conv=fsync if=/dev/source_drive of=/dev/dest_drive

Generate a file with a specific number of random bytes by using kernel random driver:

dd bs=100 count=1 if=/dev/urandom of=path/to/random_file

Benchmark the sequential write performance of a disk:

dd bs=1024 count=1000000 if=/dev/zero of=path/to/file_1GB

Create a system backup, save it into an IMG file (can be restored later by swapping if and of), and show the progress:

dd if=/dev/drive_device of=path/to/file.img status=progress

The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail.

πŸ₯Ί yeah bestie, uutils is a work in progress so some examples might just... not work. it's giving "we're getting there" energy. no cap.

and that's the whole page, gorgeous 🫢 dated 2026-09-25, from the uutils coreutils girlies, version v(uutils coreutils) 0.12.0. go copy something iconic today πŸ’…βœ¨πŸŒˆ

πŸ“¦ where this page comes from