od

octal dump,does Hex and ASCII too

od [-aBbcDdeFfHhIiLlOosvXx] [-A base] [-j skip] [-N length] [-t type] [[+]offset[.][Bb]] [file]

Converts input based on displayable conversions.

-j b[b|k|m] Skip blocks (512 bytes), kilobytes or megabytes
-N n Dump at most n bytes of input.
-A [d|o|x|n] address base, decimal, octal, hexadecimal or none.
-a
-t a
named characters.
-B
-o
-t o2
octal shorts (i.e.16 bits).
-D
-t u4
unsigned decimal ints.
-b
-t o1
octal bytes.
-c
-t c
C-style escaped undisplayable characters.
-e
-F
-t fD
double-precision floating point
-f
-t fF
single-precision floating point
-H
-X
-t x4
hexadecimal ints.
-h
-x
-t x2
hexadecimal shorts.
-I
-L
-l
-t dL
signed decimal longs.
-i
-t dI
signed decimal ints.
-O
-t o4
octal ints.
-s
-t d2
signed decimal shorts.
-t type conversion type is a string containing one or more of
a ASCII with Control characters converted as:
00 NUL 01 SOH 02 STX 03 ETX 04 EOT 05 ENQ 06 ACK 07 BEL 08 BS  09 HT  0A NL  0B VT
0c FF  0D CR  0E SO  0F SI  10 DLE 11 DC1 12 DC2 13 DC3 14 DC4 15 NAK 16 SYN 17 ETB
18 CAN 19 EM  1A SUB 1B ESC 1C FS  1D GS  1E RS  1F US  20 SP                FF DEL
c characters in the default character set. Non-displayable characters are converted as 3-digit octal codes, except :
NUL            00    \0        alert          07    \a
backspace      08    \b        tab            09    \t
newl           0A    \n        carriagreturn  0D    \r
vertical tab   0F    \v
Multi-byte characters are displayed in the area corresponding to the first byte of the character. The remaining bytes are shown as **.
[d|u|o|x][C|S|I|L|b] Signed decimal , unsigned decimal, octal, or hexadecimal.
Followed by an optional size specifier, which may be either
Char, Short, Int, Long, or a byte count as a decimal integer.
f[F|D|L|n] floating-point . Followed by an optional size specifier, which may be either
Float, Double or Llong double.
-v Verbosely write all input data,
Default replaces lines of duplicate values with a *.

Multiple options that specify output conversion may be used; the output will contain one line for each conversion.

Default conversion is -t oS, i.e. octal Short.

Environment

$LANG, $LC_ALL and $LC_CTYPE affect the execution.

The -s which extracted string constants is not supported; consider using strings

See

hexdump, strings ,xxh

conforms to IEEE Std 1003.1-2001 (``POSIX.1'').