1 .\" $NetBSD: od.1,v 1.22 2008/04/30 13:11:01 martin Exp $
3 .\" Copyright (c) 2001 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
35 .Nd octal, decimal, hex, ascii dump
38 .Op Fl aBbcDdeFfHhIiLlOovXx
47 .Op Fl t Ar type_string
60 has been deprecated in favor of
66 provides compatibility for the options described below.
67 It does not provide compatibility for the
76 options, nor is compatibility provided for the ``label'' component
79 The options are as follows:
82 Specify the input address base.
90 which specify decimal, octal, hexadecimal
91 addresses or no address, respectively.
93 .Em One-byte character display .
94 Display the input offset in octal, followed by sixteen
95 space-separated, three column, space-filled, characters of input data
97 Control characters are printed as their names instead of as
103 .Em One-byte octal display .
104 Display the input offset in octal, followed by sixteen
105 space-separated, three column, zero-filled, bytes of input data, in
107 This is the default output style if no other is
110 .Em One-byte character display .
111 Display the input offset in octal, followed by sixteen
112 space-separated, three column, space-filled, characters of input data
114 Control characters are printed at C-style escapes, or as
115 three octal digits, if no C escape exists for the character.
117 .Em Two-byte decimal display .
118 Display the input offset in octal, followed by eight
119 space-separated, five column, zero-filled, two-byte units
120 of input data, in unsigned decimal, per line.
122 .Em Eight-byte floating point display .
123 Display the input offset in octal, followed by two space-separated,
124 twenty-one column, space filled, eight byte units of input data, in
125 floating point, per line.
130 .Em Four-byte floating point display .
131 Display the input offset in octal, followed by four space-separated,
132 14 column, space filled, four byte units of input data, in floating
135 .Em Four-byte hex display .
136 Display the input offset in octal, followed by four space-separated,
137 eight column, zero filled, four byte units of input data, in hex,
140 .Em Two-byte hex display .
141 Display the input offset in octal, followed by eight space-separated,
142 four column, zero filled, two byte units of input data, in hex,
145 .Em Four-byte decimal display .
146 Display the input offset in octal, followed by four space-separated,
147 eleven column, space filled, four byte units of input data, in
150 .Em Two-byte decimal display .
151 Display the input offset in octal, followed by eight space-separated,
152 six column, space filled, two-byte units of input data, in decimal,
157 bytes from the beginning of the input.
160 is interpreted as a decimal number.
166 is interpreted as a hexadecimal number,
167 otherwise, with a leading
170 is interpreted as an octal number.
171 Appending the character
178 causes it to be interpreted as a multiple of
195 .Em Four-byte octal display .
196 Display the input offset in octal, followed by four
197 space-separated, eleven column, zero-filled, four-byte units
198 of input data, in octal, per line.
200 .Em Two-byte octal display .
201 Display the input offset in octal, followed by eight
202 space-separated, six column, zero-filled, two-byte units
203 of input data, in octal, per line.
204 .It Fl t Ar type_string
205 Specify one or more output types.
208 option-argument must be a string specifying the types to be used when
209 writing the input data.
210 The string must consist of the type specification characters:
213 selects US-ASCII output, with control characters replaced with their
214 names instead of as C escape sequences.
217 conversion provided by hexdump(1).
220 selects a standard character based conversion.
223 conversion provided by hexdump(1).
226 selects the floating point output format.
227 This type character can be optionally followed by the characters
231 to specify four byte floating point output, or
235 to specify eight byte floating point output.
236 The default output format is eight byte floats.
239 conversion provided by hexdump(1).
246 select decimal, octal, unsigned decimal, or hex output respectively.
247 These types can optionally be followed by
265 to specify one-byte output,
267 to specify two-byte output,
269 to specify four-byte output, or
271 to specify eight-byte output.
272 The default output format is in four-byte quantities.
279 conversions provided by hexdump(1).
280 .\"(a|c|f[FLD]?|[doux][C1S2I4L8]?)*
286 to display all input data.
289 option, any number of groups of output lines, which would be
290 identical to the immediately preceding group of output lines (except
291 for the input offsets), are replaced with a line comprised of a
303 sequentially copies the input to standard output, transforming the
304 data according to the options given.
305 If no options are specified, the
306 default display is equivalent to specifying the
311 exits 0 on success and \*[Gt]0 if an error occurred.
321 This man page was written in February 2001 by Andrew Brown, shortly
322 after he augmented the deprecated od syntax to include things he felt
323 had been missing for a long time.