|
42樓

樓主 |
發(fā)表于 2009-9-4 17:32:37
|
只看該作者
本帖最后由 changyongid 于 2009-9-4 17:57 編輯
我們還是先來help一下,因?yàn)榭磶椭臋n是一個(gè)非常好的習(xí)慣。
[changyongid@localhost src]$ od --help
Usage: od [OPTION]... [FILE]...
or: od [-abcdfilosx]... [FILE] [[+]OFFSET[.]]
or: od --traditional [OPTION]... [FILE] [[+]OFFSET[.] [+][LABEL][.]]
Write an unambiguous representation, octal bytes by default,
of FILE to standard output. With more than one FILE argument,
concatenate them in the listed order to form the input.
With no FILE, or when FILE is -, read standard input.
All arguments to long options are mandatory for short options.
-A, --address-radix=RADIX decide how file offsets are printed 指定地址基數(shù),這里的RADIX在help下面有詳細(xì)的解釋。
-j, --skip-bytes=BYTES skip BYTES input bytes first
-N, --read-bytes=BYTES limit dump to BYTES input bytes
-S, --strings[=BYTES] output strings of at least BYTES graphic chars
-t, --format=TYPE select output format or formats 數(shù)據(jù)顯示格式 ,同樣的,TYPE在help的下面也有詳細(xì)的解釋。
-v, --output-duplicates do not use * to mark line suppression
-w, --width[=BYTES] output BYTES bytes per output line
--traditional accept arguments in traditional form
--help 顯示此幫助信息并退出
--version 輸出版本信息并退出
我們比較常用的就是-A 和 -t參數(shù)了。。
RADIX的說明如下:
RADIX is d for decimal, o for octal, x for hexadecimal or n for none.
即:
d -十進(jìn)制
o -八進(jìn)制
x -十六進(jìn)制
n -不打印偏移植
TYPE的說明如下:
TYPE is made up of one or more of these specifications:
a named character, ignoring high-order bit
c ASCII character or backslash escape ASCII字符或反斜杠序列
d[SIZE] signed decimal, SIZE bytes per integer有符號(hào)十進(jìn)制數(shù)
f[SIZE] floating point, SIZE bytes per integer浮點(diǎn)數(shù)
o[SIZE] octal, SIZE bytes per integer八進(jìn)制(系統(tǒng)默認(rèn)值為02)
u[SIZE] unsigned decimal, SIZE bytes per integer無符號(hào)十進(jìn)制數(shù)
x[SIZE] hexadecimal, SIZE bytes per integerx 十六進(jìn)制數(shù)
除了選項(xiàng)c以外的其他選項(xiàng)后面都可以跟一個(gè)十進(jìn)制數(shù)n,指定每個(gè)顯示值所包含的字節(jié)數(shù)。
說明:od命令系統(tǒng)默認(rèn)的顯示方式是八進(jìn)制,這也是該命令的名稱由來(Octal Dump)。但這不是最有用的顯示方式,用ASCII碼和十六進(jìn)制組合的方式能提供更有價(jià)值的信息輸出。 |
|