OD(1)

πŸ’– OD(1) β€” bestie, you're in the General Commands Manual πŸ’–

okay so hi!! 🫢 this is the OD(1) page, it lives in the General Commands Manual, and it's about od, the tool that makes files go from "what even is this" to "ohhh I can read that". dump files in octal and other formats, that's the whole vibe. let's get into it πŸ¦‹


✨ NAME ✨

od β€” Dump files in octal and other formats πŸ’…


🌸 SYNOPSIS 🌸

od [OPTION]... [--] [FILENAME]...
od [-abcdDefFhHiIlLoOsxX] [FILENAME] [[+][0x]OFFSET[.][b]]
od --traditional [OPTION]... [FILENAME] [[+][0x]OFFSET[.][b]
[[+][0x]LABEL[.][b]]]

πŸ’œ DESCRIPTION πŸ’œ

Dump files in octal and other formats. that's it, that's the girl. she takes a file and gives you the raw numbers back in whatever base you want, no cap πŸ”₯


πŸŽ€ OPTIONS πŸŽ€

  • --help β€” print help information, like a little friendly hand on your shoulder 🫢
  • -A, --address-radix <RADIX> β€” pick the base that the file offsets get printed in
  • -j, --skip-bytes <BYTES> β€” skip BYTES of input before formatting and writing anything
  • -N, --read-bytes <BYTES> β€” limit the dump to BYTES input bytes
  • --endian <big|little> β€” the byte order used for multi-byte formats
    • possible values:
      • big
      • little
  • -S, --strings [<BYTES>] β€” output strings of at least BYTES graphic chars. if you don't give BYTES, 3 is assumed (she just fills it in for you, icon of her honestly)
  • -a β€” named characters, ignoring the high-order bit
  • -b β€” octal bytes
  • -c β€” ASCII characters or backslash escapes
  • -d β€” unsigned decimal 2-byte units
  • -D β€” unsigned decimal 4-byte units
  • -o β€” octal 2-byte units
  • -I β€” decimal 8-byte units
  • -L β€” decimal 8-byte units
  • -i β€” decimal 4-byte units
  • -l β€” decimal 8-byte units
  • -x β€” hexadecimal 2-byte units
  • -h β€” hexadecimal 2-byte units
  • -O β€” octal 4-byte units
  • -s β€” decimal 2-byte units
  • -X β€” hexadecimal 4-byte units
  • -H β€” hexadecimal 4-byte units
  • -e β€” floating point double precision (64-bit) units
  • -f β€” floating point single precision (32-bit) units
  • -F β€” floating point double precision (64-bit) units
  • -t, --format <TYPE> β€” select the output format, or formats plural, she contains multitudes
  • -v, --output-duplicates β€” do not use * to mark line suppression
  • -w, --width [<BYTES>] β€” output BYTES bytes per output line. if you skip BYTES, 32 is implied
  • --traditional β€” compatibility mode with one input, offset and label
  • -V, --version β€” print version

🌈 EXTRA 🌈

she displays data in all sorts of human-readable formats, which is genuinely the slay-est thing about her. if you specify multiple formats, the output contains all of them, in the order they appear on the command line. each format gets printed on a new line. and only the line containing the first format gets prefixed with the offset. only that one. the rest go commando. periodt.

if no filename is specified, or it's -, then stdin gets used. after a --, no more options will be recognized β€” which is exactly the loophole that lets you have filenames starting with a - πŸ•³οΈβœ¨

if a filename is a valid number that could be used as an offset in the second form, you can force it to be recognized as a filename by including an option like -j0, which is only valid in the first form. sneaky but legal πŸ’…

RADIX is one of o, d, x, n β€” for octal, decimal, hexadecimal, or none.

BYTES is decimal by default, octal if it's prefixed with a 0, or hexadecimal if it's prefixed with 0x. the suffixes b, KB, K, MB, M, GB, G, will multiply the number with 512, 1000, 1024, 1000^2, 1024^2, 1000^3, 1024^3, 1000^2, 1024^2.

OFFSET and LABEL are octal by default, hexadecimal if prefixed with 0x, or decimal if a . suffix is added. the b suffix will multiply with 512.

TYPE contains one or more format specifications consisting of:

a for printable 7-bits ASCII
c for utf-8 characters or octal for undefined characters
d[SIZE] for signed decimal
f[SIZE] for floating point
o[SIZE] for octal
u[SIZE] for unsigned decimal
x[SIZE] for hexadecimal SIZE is the number of bytes which can be the
number 1, 2, 4, 8 or 16,
or C, S, I, L for 1, 2, 4, 8 bytes for integer types,
or F, D, L for 4, 8, 16 bytes for floating point.  Any type
specification can have a "z" suffix, which will add a ASCII dump at
the end of the line.

and if an error occurred, a diagnostic message gets printed to stderr, and the exit code will be non-zero. so if something smells, check that exit code bestie 😭


πŸ‘‘ VERSION πŸ‘‘

v(uutils coreutils) 0.12.0


⭐ EXAMPLES ⭐

Display file using default settings: octal format, 8 bytes per line, byte offsets in octal, and duplicate lines replaced with *:

od path/to/file

Display file in verbose mode, i.e. without replacing duplicate lines with *:

od [-v|--output-duplicates] path/to/file

Display file in hexadecimal format (2-byte units), with byte offsets in decimal format:

od [-t|--format] x [-A|--address-radix] d [-v|--output-duplicates]
path/to/file

Display file in hexadecimal format (1-byte units), and 4 bytes per line:

od [-t|--format] x1 [-w|--width=]4 [-v|--output-duplicates] path/to/file

Display file in hexadecimal format along with its character representation, and do not print byte offsets:

od [-t|--format] xz [-A|--address-radix] n [-v|--output-duplicates]
path/to/file

Read only 100 bytes of a file starting from the 500th byte:

od [-N|--read-bytes] 100 [-j|--skip-bytes] 500 [-v|--output-duplicates]
path/to/file

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.


ok that's the whole page, no gatekeeping πŸ’–

and that's a wrap, bestie!! this OD(1) page came from the uutils coreutils 0.12.0 girlies, dated 2026-09-25 πŸŽ€ go dump something and feel something πŸ¦‹βœ¨

πŸ“¦ where this page comes from