1 .\" Copyright (c) 1990, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .Nd octal, decimal, hex, ASCII dump
36 .Op Fl aBbcDdeFfHhIiLlOosvXx
41 .Op Oo Cm + Oc Ns Ar offset Ns Oo Cm \&. Oc Ns Op Cm Bb
46 utility is a filter which displays the specified files, or standard
47 input if no files are specified, in a user specified format.
49 The options are as follows:
50 .Bl -tag -width ".Fl I , L , l"
52 Specify the input address base.
61 which specify decimal, octal, hexadecimal
62 addresses or no address, respectively.
64 Output named characters.
76 Output C-style escaped characters.
80 Output unsigned decimal ints.
84 Output unsigned decimal shorts.
88 Output double-precision floating point numbers.
92 Output single-precision floating point numbers.
96 Output hexadecimal ints.
100 Output hexadecimal shorts.
104 Output signed decimal longs.
108 Output signed decimal ints.
114 bytes of the combined input before dumping.
115 The number may be followed by one
120 which specify the units of the number as blocks (512 bytes), kilobytes and
121 megabytes, respectively.
131 Output signed decimal shorts.
135 Specify the output format.
139 is a string containing one or more of the following kinds of type specifiers:
140 .Bl -tag -width indent
144 Control characters are displayed using the following names:
145 .Bl -column "000 NUL" "001 SOH" "002 STX" "003 ETX" "004 EOT" "005 ENQ"
146 .It "000 NUL 001 SOH 002 STX 003 ETX 004 EOT 005 ENQ"
147 .It "006 ACK 007 BEL 008 BS 009 HT 00A NL 00B VT"
148 .It "00C FF 00D CR 00E SO 00F SI 010 DLE 011 DC1"
149 .It "012 DC2 013 DC3 014 DC4 015 NAK 016 SYN 017 ETB"
150 .It "018 CAN 019 EM 01A SUB 01B ESC 01C FS 01D GS"
151 .It "01E RS 01F US 020 SP 07F DEL \& \&"
154 Characters in the default character set.
155 Non-printing characters are
156 represented as 3-digit octal character codes, except the following
157 characters, which are represented as C escapes:
159 .Bl -tag -width carriage-return -compact
176 Multi-byte characters are displayed in the area corresponding to the first
177 byte of the character.
178 The remaining bytes are shown as
183 .Op Cm C | S | I | L | Ar n
195 Followed by an optional size specifier, which may be either
204 or a byte count as a decimal integer.
208 .Op Cm F | D | L | Ar n
211 Floating-point number.
212 Followed by an optional size specifier, which may be either
219 .Pq Vt "long double" .
222 Write all input data, instead of replacing lines of duplicate values with a
226 Multiple options that specify output format may be used; the output will
227 contain one line for each format.
229 If no output format is specified,
237 environment variables affect the execution of
244 Dump stdin and show the output using named characters and C-style escaped
246 .Bd -literal -offset indent
247 $ echo "FreeBSD: The power to serve" | od -a -c
248 0000000 F r e e B S D : sp T h e sp p o w
249 F r e e B S D : T h e p o w
250 0000020 e r sp t o sp s e r v e nl
251 e r t o s e r v e \en
255 Dump stdin skipping the first 13 bytes using named characters and dumping no
257 .Bd -literal -offset indent
258 $ echo "FreeBSD: The power to serve" | od -An -a -j 13 -N 5
264 option to extract string constants is not supported; consider using