od.1 (7705B)
1 .\" 2 .\" Sccsid @(#)od.1 1.10 (gritter) 2/6/05 3 .\" Parts taken from od(1), Unix 7th edition: 4 .\" Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. 5 .\" 6 .\" Redistribution and use in source and binary forms, with or without 7 .\" modification, are permitted provided that the following conditions 8 .\" are met: 9 .\" Redistributions of source code and documentation must retain the 10 .\" above copyright notice, this list of conditions and the following 11 .\" disclaimer. 12 .\" Redistributions in binary form must reproduce the above copyright 13 .\" notice, this list of conditions and the following disclaimer in the 14 .\" documentation and/or other materials provided with the distribution. 15 .\" All advertising materials mentioning features or use of this software 16 .\" must display the following acknowledgement: 17 .\" This product includes software developed or owned by Caldera 18 .\" International, Inc. 19 .\" Neither the name of Caldera International, Inc. nor the names of 20 .\" other contributors may be used to endorse or promote products 21 .\" derived from this software without specific prior written permission. 22 .\" 23 .\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA 24 .\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR 25 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 26 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27 .\" ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE 28 .\" LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR 29 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 30 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 31 .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 32 .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 33 .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 34 .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 .TH OD 1 "2/6/05" "Heirloom Toolchest" "User Commands" 36 .SH NAME 37 od \- octal dump 38 .SH SYNOPSIS 39 .PD 0 40 .HP 41 .ad l 42 \fBod\fR [\fB\-bcCdDfFoOsSvxX\fR] [\fIfile\fR] 43 [[\fB+\fR]\fIoffset\fR[\fB.\fR][\fBb\fR]] 44 .HP 45 .ad l 46 \fBod\fR [\fB\-v\fR] [\fB\-A\ \fIaddress_base\fR] [\fB\-j\ \fIskip\fR] 47 [\fB\-N\ \fIcount\fR] [\fB\-t\ \fItype_string\fR] ... [\fIfile\fR ...] 48 .br 49 .PD 50 .ad b 51 .SH DESCRIPTION 52 .I Od 53 dumps 54 .I file 55 in 56 one or more formats 57 as 58 selected by the option arguments. 59 If no format specification is present, 60 .B \-o 61 is default. 62 The meanings of the option arguments are: 63 .TP 64 .B \-b 65 Interpret bytes in octal. 66 .TP 67 .B \-c 68 Interpret characters. 69 Certain non-graphic characters appear as C escapes: 70 null=\e0, 71 backspace=\eb, 72 formfeed=\ef, 73 newline=\en, 74 return=\er, 75 tab=\et; 76 others appear as 3-digit octal numbers. 77 For a multibyte character, 78 the graphical representation is printed for its first byte, 79 remaining bytes are marked 80 .BR ** . 81 .TP 82 .B \-d 83 Interpret unsigned two-byte words in decimal. 84 .TP 85 .B \-D 86 Interpret unsigned four-byte words in decimal. 87 .TP 88 .B \-f 89 Interpret floating point format as single precision. 90 .TP 91 .B \-F 92 Interpret floating point format as double precision. 93 .TP 94 .B \-o 95 Interpret two-byte words in octal. 96 .TP 97 .B \-O 98 Interpret four-byte words in octal. 99 .TP 100 .B \-s 101 Interpret signed two-byte words in decimal. 102 .TP 103 .B \-S 104 Interpret signed four-byte words in decimal. 105 .TP 106 .B \-v 107 Print identical groups of output lines 108 that immediately follow each other 109 instead of abbreviating 110 all but the first one by printing a single 111 .B * 112 character. 113 .TP 114 .B \-x 115 Interpret two-byte words in hexadecimal. 116 .TP 117 .B \-X 118 Interpret four-byte words in hexadecimal. 119 .PP 120 The following option is supported as an extension: 121 .TP 122 .B \-C 123 Prints the input data interpreted as characters 124 as another column right next to the regular output. 125 Non-printable characters are replaced by periods. 126 .PP 127 The 128 .I file 129 argument specifies which file is to be dumped. 130 If no file argument is specified, 131 the standard input is used. 132 If more than one file argument is specified, 133 the concatenation of all files 134 without an intervening separator 135 is dumped. 136 .PP 137 The offset argument specifies the offset 138 in the file where dumping is to commence. 139 This argument is normally interpreted 140 as octal bytes. 141 If `\fB.\fR' is appended, the offset is interpreted in 142 decimal. 143 If `\fBb\fR' is appended, the offset is interpreted in 144 blocks of 512 bytes. 145 If the file argument is omitted, 146 the offset argument must be preceded by 147 .RB ` + ' 148 with 149 .BR /usr/5bin/posix/od . 150 .PP 151 The following options have been introduced by POSIX.2. 152 If any of these options is present, 153 an offset-like argument 154 is always interpreted as the name of a file to be dumped. 155 .TP 156 \fB\-A \fIaddress_base\fR 157 Sets the format of the file offset printed in the first column. 158 Valid values for \fIaddress_base\fR are: 159 .RS 160 .TP 3 161 .B d 162 Print offset as decimal. 163 .TP 3 164 .B n 165 Print no offset column. 166 .TP 3 167 .B o 168 Print offset as octal (default). 169 .TP 3 170 .B x 171 Print offset as hexadecimal. 172 .RE 173 .TP 174 \fB\-j \fIskip\fR 175 Skip 176 .I skip 177 bytes of input, 178 where 179 .I skip 180 may be either a decimal number, 181 an octal number preceded by 182 .BR 0 , 183 or a hexadecimal number preceded by 184 .B 0x 185 or 186 .BR 0X . 187 If the last character of 188 .I skip 189 is 190 .B b 191 (if not a hexadecimal number), 192 .BR k , 193 or 194 .BR m , 195 the value is multiplied by 196 512, 1024, or 1048576, respectively. 197 .TP 198 \fB\-N \fIcount\fR 199 Terminate processing after 200 .I count 201 bytes of input, 202 where 203 .I count 204 may be either a decimal number, 205 an octal number preceded by 206 .BR 0 , 207 or a hexadecimal number preceded by 208 .B 0x 209 or 210 .BR 0X . 211 .TP 212 \fB\-t \fItype_string\fR 213 Set output format. 214 \fItype_string\fR may consist of one or more specifications as follows: 215 .RS 216 .TP 217 \fBa\fR 218 Print characters, 219 ignoring the most significant bit. 220 ASCII control characters are printed as their names, 221 other nonprintable characters are printed as octal bytes. 222 .TP 223 \fBc\fR 224 Print characters. 225 Non-printable characters are either printed as escape sequences 226 `\e0', `\ea', `\eb', `\ef', `\en', `\er', `\et', `\ev' 227 or as octal bytes. 228 For a multibyte character, 229 the graphical representation is printed for its first byte, 230 remaining bytes are marked 231 .BR ** . 232 .TP 233 \fBd\fR[\fB1\fR|\fB2\fR|\fB4\fR|\fB8\fR|\fBC\fR|\fBS\fR|\fBI\fR|\fBL\fR] 234 Print signed decimal words, 235 with the word length indicated by the second character 236 (\fB1\fR one byte per word, 237 \fB2\fR two bytes per word, 238 \fB4\fR four bytes per word, 239 \fB8\fR eight bytes per word, 240 \fBC\fR the size of the C language `char' data type, 241 \fBS\fR the size of the C language `short' data type, 242 \fBI\fR the size of the C language `int' data type, 243 and \fBL\fR the size of the C language `long' data type). 244 The default is the machine word length. 245 .TP 246 \fBf\fR[\fB4\fR|\fB8\fR|\fBF\fR|\fBD\fR|\fBL\fR] 247 Print floating point format, 248 with the precision indicated by the second character 249 (\fB4\fR and \fBF\fR single precision, 250 \fB8\fR, \fBD\fR, and \fBL\fR double precision). 251 The default is double precision. 252 .TP 253 \fBo\fR[\fB1\fR|\fB2\fR|\fB4\fR|\fB8\fR|\fBC\fR|\fBS\fR|\fBI\fR|\fBL\fR] 254 Print octal words, 255 with the word length indicated by the second character 256 as described for 257 .B d 258 above. 259 .TP 260 \fBu\fR[\fB1\fR|\fB2\fR|\fB4\fR|\fB8\fR|\fBC\fR|\fBS\fR|\fBI\fR|\fBL\fR] 261 Print unsigned decimal words, 262 with the word length indicated by the second character 263 as described for 264 .B d 265 above. 266 .TP 267 \fBx\fR[\fB1\fR|\fB2\fR|\fB4\fR|\fB8\fR|\fBC\fR|\fBS\fR|\fBI\fR|\fBL\fR] 268 Print hexadecimal words, 269 with the word length indicated by the second character 270 as described for 271 .B d 272 above. 273 .RE 274 .PP 275 Unless the 276 .B \-N 277 option is given, 278 dumping continues until end-of-file. 279 .SH "ENVIRONMENT VARIABLES" 280 .TP 281 .BR LANG ", " LC_ALL 282 See 283 .IR locale (7). 284 .TP 285 .B LC_CTYPE 286 Determines the mapping of bytes to characters 287 for the 288 .B \-c 289 and 290 .B \-tc 291 options.