The od
command reads the contents of the specified file and presents its contents as octal byte code.
od [OPTION]... [FILE]...
od [-abcdfilosx]... [FILE] [[+]OFFSET[.][b]]
od --traditional [OPTION]... [FILE] [[+]OFFSET[.][b] [+][LABEL][.][b]]
-A, --address-radix=RADIX
: Choose the radix for calculating byte addresses.-j, --skip-bytes=BYTES
: Skip the specified number of bytes.-N, --read-bytes=BYTES
: Read up to the specified number of bytes.-S BYTES, --strings[=BYTES]
: Print strings of at leastBYTES
graphical characters; default is3
whenBYTES
is not specified.-t, --format=TYPE
: Use the specified output format.-v, --output-duplicates
: Do not omit duplicate data when printing.-w[BYTES], --width[=BYTES]
: Output up toBYTES
bytes per line.--help
: Display this help and exit.--version
: Output version information and exit.
-a
: same as-t a
, select named characters.-b
: same as-t o1
, select octal bytes.-c
: same as-t c
, select ASCII characters or backslash escapes.-d
: same as-t u2
, select unsigned decimal2
bytes.-f
: same as-t fF
, select floating-point numbers.-i
: same as-t dI
, select decimal integers.-l
: same as-t dL
, select decimal long.-o
: same as-t o2
, select octal2
bytes.-s
: same as-t d2
, select decimal2
bytes.-x
: same as-t x2
, select hexadecimal2
bytes.d[SIZE]
: signed decimal, each integerSIZE
bytes wide.f[SIZE]
: floating point, each integerSIZE
bytes wide.o[SIZE]
: octal, each integerSIZE
bytes wide.u[SIZE]
: unsigned decimal, each integerSIZE
bytes wide.x[SIZE]
: hexadecimal, each integerSIZE
bytes wide.
Output the octal byte code of a file.
od /tmp/file.txt
Output using single-byte octal interpretation, with the default address format of eight bytes on the left.
od -c /tmp/file.txt
Output using ASCII code, including escape characters, with the default address format of eight bytes on the left.
od -t d1 /tmp/file.txt
https://github.com/WindrunnerMax/EveryDay
https://www.howtoforge.com/linux-od-command/
https://www.runoob.com/linux/linux-comm-od.html
https://www.tutorialspoint.com/unix_commands/od.htm