od(octal dump)
od(octal dump)功能说明:输出文件内容。
语 法:od [-abcdfhilovx][-A <字码基数>][-j <字符数目>][-N <字符数目>][-s <字符串字符数>][-t <输出格式>][-w <每列字符数>][--help][--version][文件...]
补充说明:od指令会读取所给予的文件的内容,并将其内容以八进制字码呈现出来。
参 数:
-a 此参数的效果和同时指定"-ta"参数相同。
-A<字码基数> 选择要以何种基数计算字码。
-b 此参数的效果和同时指定"-toC"参数相同。
-c 此参数的效果和同时指定"-tC"参数相同。
-d 此参数的效果和同时指定"-tu2"参数相同。
-f 此参数的效果和同时指定"-tfF"参数相同。
-h 此参数的效果和同时指定"-tx2"参数相同。
-i 此参数的效果和同时指定"-td2"参数相同。
-j<字符数目>或--skip-bytes=<字符数目> 略过设置的字符数目。
-l 此参数的效果和同时指定"-td4"参数相同。
-N<字符数目>或--read-bytes=<字符数目> 到设置的字符数目为止。
-o 此参数的效果和同时指定"-to2"参数相同。
-s<字符串字符数>或--strings=<字符串字符数> 只显示符合指定的字符数目的字符串。
-t<输出格式>或--format=<输出格式> 设置输出格式。
-v或--output-duplicates 输出时不省略重复的数据。
-w<每列字符数>或--width=<每列字符数> 设置每列的最大字符数。
-x 此参数的效果和同时指定"-h"参数相同。
--help 在线帮助。
--version 显示版本信息。
od
od [options] [files] od --traditional [file] [[+] offset [[+] label] ]
Dump the specified files to standard output. The default is to dump in octal format, but other formats can be specified. With multiple files, concatenate them in the specified order. If no files are specified or file is -, read from standard input. With the second form, using the --traditional option, only one file can be specified.
Options
For the following options, see the later Arguments section for an explanation of the arguments bytes, size, and type. If no options are specified, the default is -A o -t d2 -w 16.
Print as named characters. Same as -ta.
Specify the radix (base) for the file offsets printed at the beginning of each output line. The possible values are:
d Decimal.
n None; do not print an offset.
o Octal; the default.
x Hexadecimal.
Print as octal bytes. Same as -toC.
Print as ASCII characters or backslash escapes. Same as -tc.
Print as unsigned decimal shorts. Same as -tu2.
Print as floating-point. Same as -tfF.
Print as hexadecimal shorts. Same as -tx2.
Display a usage message and exit.
Print as decimal shorts. Same as -td2.
Skip the specified number of input bytes before starting.
Print as decimal longs. Same as -td4.
Format and print only the specified number of input bytes.
Print as octal shorts. Same as -to2.
Output strings that are at least bytes ASCII graphic characters long (default is 3 if bytes is not specified for --strings).
Format the output according to type, where type is a string of one or more of the characters listed in the Arguments section. If more than one type is specified, each output line is written once in each specified format. If a trailing z is appended to type, od appends any printable characters to the end of each output line.
Accept arguments in the traditional form, which takes a single file specification with an optional offset and label, as shown in the second form of the command. offset is an octal number indicating how many input bytes to skip over. label specifies an initial pseudo-address, which is printed in parentheses after any normal address. Both the offset and the label can begin with an optional plus sign (+), and can have a trailing decimal point (
. ) to force the offset to be interpreted as a decimal number and/or a trailing b to multiply the number of bytes skipped by offset by 512.
Print all lines, including duplicates. By default, only the first of a series of identical lines is printed, and an asterisk is printed at the beginning of the following line to indicate that there were duplicates.
Display version information and exit.
Dump bytes input bytes to each output line. Defaults to 16 if this option is omitted. If --width is specified but bytes is omitted, the default is 32.
Print as hexadecimal shorts. Same as -tx2.
Arguments
Specify a number of bytes. Treated as hexadecimal if it begins with 0x or 0X, as octal if it begins with 0, or as decimal otherwise. Append b to multiply by 512, k to multiply by 1024, or m to multiply by 10248576.
Specified as part of type to indicate how many bytes to use in interpreting each number. Types a and c do not take a size. For other types, size is a number. For type f, size can also be one of the following:
D Double.
F Float.
L Long double.
For the remaining types (d, o, u, x), size can be one of the following in addition to a number:
C Character.
I Integer.
L Long.
S Short.
Specify the format type. The possible types are:
a Named character.
c ASCII character or backslash escape.
dsize Signed decimal, with size bytes per integer.
fsize Floating point, with size bytes per integer.
o Octal, with size bytes per integer.
u Unsigned decimal, with size bytes per integer.
x Hexadecimal, with size bytes per integer.