Od (Unix)
Encyclopedia
od is an octal
dumping program for Unix
and Unix-like systems. It can also dump hexadecimal
or decimal
data.
od is one of the earliest Unix programs, having appeared in version 1 AT&T Unix. It is also specified in the POSIX
standards (see external link below). The implementation for od used on Linux
systems is usually provided by GNU Core Utilities
.
program prints out the first few lines of the output. Here is an example of a dump of the "Hello world" program
, piped through head.
and here is od used to diagnose the output of echo where the user types and after writing "Hello" to literal insert a tab
and ^C character:
Octal
The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Numerals can be made from binary numerals by grouping consecutive binary digits into groups of three...
dumping program for Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...
and Unix-like systems. It can also dump hexadecimal
Hexadecimal
In mathematics and computer science, hexadecimal is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F to represent values ten to fifteen...
or decimal
Decimal
The decimal numeral system has ten as its base. It is the numerical base most widely used by modern civilizations....
data.
od is one of the earliest Unix programs, having appeared in version 1 AT&T Unix. It is also specified in the POSIX
POSIX
POSIX , an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems...
standards (see external link below). The implementation for od used on Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
systems is usually provided by GNU Core Utilities
GNU Core Utilities
The GNU Core Utilities or coreutils is a package of GNU software containing many of the basic tools, such as cat, ls, and rm, needed for Unix-like operating systems...
.
Example session
Normally a dump of an executable file is very long. The headHead (Unix)
head is a program on Unix and Unix-like systems used to display the first few lines of a text file or piped data. The command syntax is: head [options] <file_name>...
program prints out the first few lines of the output. Here is an example of a dump of the "Hello world" program
Hello world program
A "Hello world" program is a computer program that outputs "Hello world" on a display device. Because it is typically one of the simplest programs possible in most programming languages, it is by tradition often used to illustrate to beginners the most basic syntax of a programming language, or to...
, piped through head.
and here is od used to diagnose the output of echo where the user types and after writing "Hello" to literal insert a tab
Tab key
Tab key on a keyboard is used to advance the cursor to the next tab stop.- Origin :The word tab derives from the word tabulate, which means "to arrange data in a tabular, or table, form"...
and ^C character: