ODOC: od

od — Dump files in Octal and other formats.

Summary:

od (Octal Dump) writes an unambiguous representation of the file in screen. Each line of output consists of the offset in the input, followed by groups of data from the file.

Examples:

Create a 2 lines text file to test following examples.

$ od myfile — Dump the content and Offset in Octal format.

$ od -a myfile — Dump the content as named char.

$ od -b myfile — Dump the content in octal bytes.

$ od -c myfile — Dump the content in ASCII.

$ od -h myfile — Dump the content in Short Hex.

$ od -w6 myfile — Set output width to 6 Bytes. Default is 16.

$ od -j6 myfile — Skip initial 6 Bytes.

$ od -N6 myfile — Read only 6 Bytes.

$ od -Ad myfile — Show Offset values in decimal.

$ od -Ax myfile — Show Offset values in Hex.

$ od -An myfile — Don’t show the Offset.

Read: man od

od, odoc, linux, gnu/linux