owner bin, not root
[unix-history] / usr / src / old / od / od.1
CommitLineData
bd1115d9
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
07cbd9ad 5.\" @(#)od.1 6.1 (Berkeley) %G%
bd1115d9 6.\"
07cbd9ad 7.TH OD 1 ""
bd1115d9
KM
8.UC 4
9.SH NAME
8aff1406 10od \- octal, decimal, hex, ascii dump
bd1115d9
KM
11.SH SYNOPSIS
12.B od
8aff1406 13[ \-format ] [ file ] [ [\fB+\fP]offset[\fB.\fP][\fBb\fP] [label] ]
bd1115d9
KM
14.SH DESCRIPTION
15.I Od
8aff1406
KM
16displays
17.IR file ,
18or it's standard input,
19in one or more dump formats
20as selected by the first argument.
bd1115d9
KM
21If the first argument is missing,
22.B \-o
8aff1406
KM
23is the default.
24Dumping continues until end-of-file.
25.PP
26The meanings of the format argument characters are:
27.TP 5
28.B a
29Interpret bytes as characters and display them with their ACSII names.
30If the
31.B p
32character is given also, then bytes with even parity are underlined.
33The
34.B P
35character causes bytes with odd parity to be underlined.
36Otherwise the parity bit is ignored.
37.TP 5
bd1115d9 38.B b
8aff1406
KM
39Interpret bytes as unsigned octal.
40.TP 5
bd1115d9 41.B c
8aff1406 42Interpret bytes as ASCII characters.
bd1115d9
KM
43Certain non-graphic characters appear as C escapes:
44null=\e0,
45backspace=\eb,
46formfeed=\ef,
47newline=\en,
48return=\er,
49tab=\et;
50others appear as 3-digit octal numbers.
8aff1406
KM
51Bytes with the parity bit set are displayed in octal.
52.TP 5
bd1115d9 53.B d
8aff1406
KM
54Interpret (short) words as unsigned decimal.
55.TP 5
56.B f
57Interpret long words as floating point.
58.TP 5
59.B h
60Interpret (short) words as unsigned hexadecimal.
61.TP 5
62.B i
63Interpret (short) words as signed decimal.
64.TP 5
65.B l
66Interpret long words as signed decimal.
67.TP 5
bd1115d9 68.B o
8aff1406
KM
69Interpret (short) words as unsigned octal.
70.TP 5
71.BR s [n]
72Look for strings of ascii graphic characters, terminated with a null byte.
73.I N
74specifies the minimum length string to be recognized.
75By default, the minimum length is 3 characters.
76.TP 5
77.B v
78Show all data. By default, display lines that are identical to the last
79line shown are not output, but are indicated with an ``*'' in column 1.
80.TP 5
81.BR w [n]
82Specifies the number of input bytes to be interpreted and displayed
83on each output line. If
84.B w
85is not specified, 16 bytes are read for each display line.
86If
87.I n
88is not specified, it defaults to 32.
89.TP 5
bd1115d9 90.B x
8aff1406
KM
91Interpret (short) words as hexadecimal.
92.PP
93An upper case format character implies the long or double precision
94form of the object.
bd1115d9
KM
95.PP
96The
8aff1406
KM
97.I offset
98argument specifies the byte offset
99into the file where dumping is to commence.
100By default this argument is interpreted in octal.
101A different radix can be specified;
102If ``\fB.\fR'' is appended to the argument, then
103.I offset
104is interpreted in decimal.
105If
106.I offset
107begins with ``\fBx\fP'' or ``\fB0x\fP'',
108it is interpreted in hexadecimal.
109If ``\fBb\fP'' (``\fBB\fP'') is appended, the offset is interpreted
110as a block count, where a block is 512 (1024) bytes.
111If the
bd1115d9 112.I file
8aff1406
KM
113argument is omitted, an
114.I offset
115argument must be preceded by
116.RB `` + ''.
bd1115d9 117.PP
8aff1406
KM
118The radix of the displayed address will be the same as the radix of the
119.IR offset ,
120if specified; otherwise it will be octal.
bd1115d9 121.PP
8aff1406
KM
122.I Label
123will be interpreted as a pseudo-address for the first byte displayed.
124It will be shown in ``()'' following the file offset.
125It is intended to be used with
126core images to indicate the real memory address.
127The syntax for
128.I label
129is identical to that for
130.IR offset .
bd1115d9
KM
131.SH "SEE ALSO"
132adb(1)
8aff1406
KM
133.SH BUGS
134A file name argument can't start with ``+''.
135A hexadecimal offset can't be a block count.
136Only one file name argument can be given.
137.PP
138It is an historical botch to require specification of object, radix, and
139sign representation in a single character argument.