BSD 4_3 release
[unix-history] / usr / man / man1 / od.1
index 1934d3d..f34605c 100644 (file)
@@ -1,35 +1,45 @@
-.TH OD 1 "1 April 1981"
+.\" Copyright (c) 1980 Regents of the University of California.
+.\" All rights reserved.  The Berkeley software License Agreement
+.\" specifies the terms and conditions for redistribution.
+.\"
+.\"    @(#)od.1        6.1 (Berkeley) 4/29/85
+.\"
+.TH OD 1 "April 29, 1985"
 .UC 4
 .SH NAME
 .UC 4
 .SH NAME
-od \- octal dump
+od \- octal, decimal, hex, ascii dump
 .SH SYNOPSIS
 .B od
 .SH SYNOPSIS
 .B od
-[
-.B \-abcdoxDOXw
-] [ file ] [ [
-.B +
-]offset[
-.BR ". " "]["
-\fBb\fR ] ]
+[ \-format ] [ file ] [ [\fB+\fP]offset[\fB.\fP][\fBb\fP] [label] ]
 .SH DESCRIPTION
 .I Od
 .SH DESCRIPTION
 .I Od
-dumps
-.I file
-in
-one or more formats
-as
-selected by the first argument.
+displays
+.IR file ,
+or it's standard input,
+in one or more dump formats
+as selected by the first argument.
 If the first argument is missing,
 .B \-o
 If the first argument is missing,
 .B \-o
-is default.
-The meanings of the format argument characters
-are:
-.TP 3
+is the default.
+Dumping continues until end-of-file.
+.PP
+The meanings of the format argument characters are:
+.TP 5
+.B  a
+Interpret bytes as characters and display them with their ACSII names.
+If the
+.B p
+character is given also, then bytes with even parity are underlined.
+The
+.B P
+character causes bytes with odd parity to be underlined.
+Otherwise the parity bit is ignored.
+.TP 5
 .B  b
 .B  b
-Interpret bytes in octal.
-.TP 3
+Interpret bytes as unsigned octal.
+.TP 5
 .B  c
 .B  c
-Interpret bytes in ASCII.
+Interpret bytes as ASCII characters.
 Certain non-graphic characters appear as C escapes:
 null=\e0,
 backspace=\eb,
 Certain non-graphic characters appear as C escapes:
 null=\e0,
 backspace=\eb,
@@ -38,46 +48,92 @@ newline=\en,
 return=\er,
 tab=\et;
 others appear as 3-digit octal numbers.
 return=\er,
 tab=\et;
 others appear as 3-digit octal numbers.
-.TP 3
+Bytes with the parity bit set are displayed in octal.
+.TP 5
 .B  d
 .B  d
-Interpret shorts (16 bit words) in decimal.
-.TP 3
+Interpret (short) words as unsigned decimal.
+.TP 5
+.B  f
+Interpret long words as floating point.
+.TP 5
+.B  h
+Interpret (short) words as unsigned hexadecimal.
+.TP 5
+.B  i
+Interpret (short) words as signed decimal.
+.TP 5
+.B  l
+Interpret long words as signed decimal.
+.TP 5
 .B  o
 .B  o
-Interpret shorts (16 bit words) in octal.
-.TP 3
-.B  w
-Produce wide (132 column) output.
-.TP 3
+Interpret (short) words as unsigned octal.
+.TP 5
+.BR s [n]
+Look for strings of ascii graphic characters, terminated with a null byte.
+.I N
+specifies the minimum length string to be recognized.
+By default, the minimum length is 3 characters.
+.TP 5
+.B  v
+Show all data. By default, display lines that are identical to the last
+line shown are not output, but are indicated with an ``*'' in column 1.
+.TP 5
+.BR w [n]
+Specifies the number of input bytes to be interpreted and displayed
+on each output line. If
+.B w
+is not specified, 16 bytes are read for each display line.
+If
+.I n
+is not specified, it defaults to 32.
+.TP 5
 .B  x
 .B  x
-Interpret shorts (16 bit words) in hex.
-.TP 3
-.B  D
-Interpret longs (32 bit words) in decimal.
-.TP 3
-.B  O
-Interpret longs (32 bit words) in octal.
-.TP 3
-.B  X
-Interpret longs (32 bit words) in hex.
+Interpret (short) words as hexadecimal.
+.PP
+An upper case format character implies the long or double precision
+form of the object.
 .PP
 The
 .PP
 The
+.I offset
+argument specifies the byte offset
+into the file where dumping is to commence.
+By default this argument is interpreted in octal.
+A different radix can be specified;
+If ``\fB.\fR'' is appended to the argument, then
+.I offset
+is interpreted in decimal.
+If
+.I offset
+begins with ``\fBx\fP'' or ``\fB0x\fP'',
+it is interpreted in hexadecimal.
+If ``\fBb\fP'' (``\fBB\fP'') is appended, the offset is interpreted
+as a block count, where a block is 512 (1024) bytes.
+If the
 .I file
 .I file
-argument specifies which file is to be dumped.
-If no file argument is specified,
-the standard input is used.
+argument is omitted, an
+.I offset
+argument must be preceded by
+.RB `` + ''.
 .PP
 .PP
-The offset argument specifies the offset
-in the file where dumping is to commence.
-This argument is normally interpreted
-as octal bytes.
-If `\fB.\fR' is appended, the offset is interpreted in
-decimal.
-If `\fBb\fR' is appended, the offset is interpreted in
-blocks of 512 bytes.
-If the file argument is omitted,
-the offset argument must be preceded 
-.RB ` + '.
+The radix of the displayed address will be the same as the radix of the
+.IR offset ,
+if specified; otherwise it will be octal.
 .PP
 .PP
-Dumping continues until end-of-file.
+.I Label
+will be interpreted as a pseudo-address for the first byte displayed.
+It will be shown in ``()'' following the file offset.
+It is intended to be used with
+core images to indicate the real memory address.
+The syntax for
+.I label
+is identical to that for
+.IR offset .
 .SH "SEE ALSO"
 adb(1)
 .SH "SEE ALSO"
 adb(1)
+.SH BUGS
+A file name argument can't start with ``+''.
+A hexadecimal offset can't be a block count.
+Only one file name argument can be given.
+.PP
+It is an historical botch to require specification of object, radix, and
+sign representation in a single character argument.