Name
od [options
] [files
] — coreutils
Synopsis
/usr/bin
stdin stdout - file -- opt --help --version
When you want to view a binary file, consider od
(Octal Dump) for the job. It copies one or more files to standard output, displaying their data in ASCII, octal, decimal, hexadecimal, or floating point, in various sizes (byte, short, long). For example, this command:
$ od -w8 /usr/bin/who
0000000 042577 043114 000401 000001
0000010 000000 000000 000000 000000
0000020 000002 000003 000001 000000
0000030 106240 004004 000064 000000
...
displays the bytes in binary file /usr/bin/who in octal, eight bytes per line. The column on the left contains the file offset of each row, again in octal.
Useful options | |
| Display only the first |
| Begin the output at byte |
| Display |
| Group each row of bytes into sequences of |
| Display file offsets in the leftmost column, in decimal ( |
Get Linux Pocket Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.