LinuxCommandLibrary

od

TLDR

Dump file in octal

$ od [file]
copy
Dump in hexadecimal
$ od -x [file]
copy
Dump as ASCII
$ od -c [file]
copy
Dump with addresses
$ od -A x -t x1 [file]
copy
Skip bytes from start
$ od -j [bytes] [file]
copy
Limit output length
$ od -N [bytes] [file]
copy

SYNOPSIS

od [options] [file...]

DESCRIPTION

od dumps files in various formats. Shows octal, hex, or ASCII.
The tool displays file contents byte-by-byte. Useful for binary analysis.
od displays file contents.

PARAMETERS

FILE

File(s) to dump.
-A RADIX
Address radix (d, o, x, n).
-t TYPE
Output type (c, d, o, x).
-x
Hexadecimal output.
-c
ASCII character output.
-j BYTES
Skip bytes at start.
-N BYTES
Limit output bytes.
--help
Display help information.

CAVEATS

Default is octal. Use -x for hex. Part of coreutils.

HISTORY

od (octal dump) originated in early Unix for viewing file contents in octal.

SEE ALSO

hexdump(1), xxd(1), hd(1)

Copied to clipboard