linux hexdump使用
发布时间:2020-12-14 00:23:18 所属栏目:Linux 来源:网络整理
导读:# hexdump -hhexdump: invalid option -- ‘h‘Usage: hexdump [options] file...Options: -b one-byte octal display#单字节八进制显示 -c one-byte character display#单字节字符显示 -C canonical hex+ASCII display#规范化 十六进制+ASCII 显示 -d two-b
# hexdump -h hexdump: invalid option -- ‘h‘ Usage: hexdump [options] file... Options: -b one-byte octal display#单字节八进制显示 -c one-byte character display#单字节字符显示 -C canonical hex+ASCII display#规范化 十六进制+ASCII 显示 -d two-byte decimal display#两字节十进制显示 -o two-byte octal display#两字节八进制显示 -x two-byte hexadecimal display#两字节十六进制显示 -e format format string to be used for displaying data#格式 用于显示数据的格式字符串 -f format_file file that contains format strings#格式文件 包含格式字符串的文件 -n length interpret only length bytes of input#长度 只解释输入的指定长度个字节 -s offset skip offset bytes from the beginning#偏移 跳过开头指定长度个字节 -v display without squeezing similar lines#显示时不压缩相似的行 -V output version information and exit#显示此帮助并退出
# more a.txt abcde ABCDE # hexdump a.txt 0000000 6261 6463 0a65 4241 4443 0a45 000000c
第一列表示:文件偏移量 badc0aeBADC0aE (注意:在Linux中换行符n 的十六进制为0a,在windows中,换行为rn的十六进制编码为:0d 0a) 为什么翻译成文本成倒序了呢? 其实这是CPU架构所致,感兴趣的可以看下大小端的定义: 有没有更加较便于方便的查看方式了?有,这也是较常用的方式。 # hexdump -C a.txt 00000000 61 62 63 64 65 0a 41 42 43 44 45 0a |abcde.ABCDE.| 0000000c (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |