{"id":2407,"date":"2010-08-22T18:44:35","date_gmt":"2010-08-22T10:44:35","guid":{"rendered":"http:\/\/www.orczhou.com\/?p=2407"},"modified":"2010-08-22T22:08:43","modified_gmt":"2010-08-22T14:08:43","slug":"linux-od-data-file","status":"publish","type":"post","link":"https:\/\/www.orczhou.com\/index.php\/2010\/08\/linux-od-data-file\/","title":{"rendered":"Linux\u4e0b\u4f7f\u7528od\u67e5\u770b\u6587\u4ef6"},"content":{"rendered":"<p><font color=\"red\"><\/p>\n<pre>        \"\u4e0d\u79ef\u8dec\u6b65\uff0c\u65e0\u4ee5\u81f3\u5343\u91cc\"\r\n                                 \u300a\u529d\u5b66\u300b\r\n<\/pre>\n<p><\/font><\/p>\n<p>\u67e5\u770b\u6587\u672c\u6587\u4ef6\u4f7f\u7528vim\/less\u5c31\u8db3\u591f\u4e86\uff0c\u4f46\u5982\u679c\u60f3\u8981\u67e5\u770b\u4e00\u4e9b\u5176\u4ed6\u4e8c\u8fdb\u5236\u6587\u4ef6\uff08\u4f8b\u5982DB\u7684\u6570\u636e\u6587\u4ef6\u3001\u7a0b\u5e8f\u7684\u4e8c\u8fdb\u5236\u4ee3\u7801\uff09\u5219\u501f\u52a9\u4e8eod\/hexdump\u8fd9\u4e9b\u5de5\u5177\u4f1a\u5f88\u65b9\u4fbf\uff0c\u8fd9\u91cc\u4f1a\u901a\u8fc7\u4e00\u4e9b\u5b9e\u4f8b\u6765\u8be6\u7ec6\u4ecb\u7ecdod\u547d\u4ee4\u7684\u76f8\u5173\u53c2\u6570\u3002<\/p>\n<div class=\"myt1\">1. od\u53c2\u6570\u8be6\u89e3<\/div>\n<pre><div class=\"mycode\">$od -j 49152 -N 38 -w4 -A d -t x1 -v tmp_test.ibd\r\n0049152 fd 6f fb 70\r\n0049156 00 00 00 03\r\n0049160 ff ff ff ff\r\n0049164 ff ff ff ff\r\n0049168 00 00 00 03\r\n0049172 ba 92 ac 0c\r\n0049176 45 bf 00 00\r\n0049180 00 00 00 00\r\n0049184 00 00 00 00\r\n<\/div><\/pre>\n<p><!--more--><\/p>\n<p>-j 49152 \u8df3\u8fc7\u524d49152\u4e2a\u5b57\u8282\uff08bytes\uff09<\/p>\n<p>-N 38 \u4ec5\u663e\u793a38\u4e2a\u5b57\u8282<\/p>\n<p>-w4 \u6bcf\u4e00\u884c\u663e\u793a4\u4e2a\u5b57\u8282<\/p>\n<p>-A d \u8868\u793a\u6700\u5de6\u4fa7\u7684\u504f\u79fb\u91cf\u6309\u5341\u8fdb\u5236\u663e\u793a\uff1b-A\u8fd8\u53ef\u4ee5\u63a5[doxn]\uff0c\u5176\u4e2dd\u8868\u793a\u5341\u8fdb\u5236\uff0co\u8868\u793a8\u8fdb\u5236\uff0cx\u8868\u793a16\u8fdb\u5236\uff0cn\u8868\u793a\u4e0d\u663e\u793a\u8be5\u504f\u79fb\u91cf\uff0c\u5982\uff1a<\/p>\n<pre><div class=\"mycode\">od -j 49152 -N 8 -w4 -A n -t x1 -v ibdata1   \r\n b4 0b c7 31\r\n 00 00 00 03\r\n<\/div><\/pre>\n<p>-t x1\u8868\u793a\u5982\u4f55\u663e\u793a\u6587\u4ef6\u5185\u5bb9\u3002\u8fd9\u91cc\uff0cx\u8868\u793a\u6309\u716716\u8fdb\u5236\u8f93\u51fa\u6587\u4ef6\u5185\u5bb9\uff0cx\u540e\u9762\u8ddf\u7684\u201c1\u201d\u8868\u793a\u4e00\u6b21\u663e\u793a\u4e00\u4e2a\u5b57\u8282\u3002\u4e0b\u9762\u662f\u4e00\u4e2a-t x2\u7684\u8f93\u51fa\uff1a<\/p>\n<pre><div class=\"mycode\">od -j 49152 -N 8 -w4 -A n -t x2 -v ibdata1 \r\n 0bb4 31c7    # 0bb4\u662f\u5341\u8fdb\u5236\u8868\u793a\u7684\u4e24\u4e2a\u5b57\u8282\r\n 0000 0300    #\r\n<\/div><\/pre>\n<p>\u53e6\u5916\uff0c\u6ce8\u610f\u5230\u8fd9\u91cc\u662f0bb4\u548c\u524d\u9762\u7684b40b\u7565\u6709\u4e0d\u540c\uff0c\u8fd9\u662f\u56e0\u4e3a\u6211\u8fd9\u91cc\u7684\u6d4b\u8bd5\u5e73\u53f0\u662flittle-endian\u7684\uff08x86_64 Linux\uff09\u3002<\/p>\n<p>\u6700\u540e\uff0c\u53c2\u6570-v\u8868\u793a\uff0c\u5373\u4f7f\u8fde\u7eed\u591a\u884c\u90fd\u662f\u5b8c\u5168\u76f8\u540c\u7684\u5b57\u7b260\uff0c\u4ecd\u7136\u539f\u6837\u8f93\u51fa\uff1b\u4e0d\u52a0\u8be5\u53c2\u6570\uff0c\u5219\u4f1a\u4f7f\u7528\u661f\u53f7\uff08*\uff09\u8df3\u8fc7\u591a\u4e2a\u76f8\u540c\u7684\u884c\u3002<\/p>\n<p>\u597d\u4e86\uff0c\u518d\u56de\u5934\u770b\u770b\u6700\u524d\u9762\u7684\u547d\u4ee4\uff0c\u5df2\u7ecf\u6ca1\u90a3\u4e48\u96be\u7406\u89e3\u4e86\u5427\u3002<\/p>\n<p>\u53c2\u8003\u6587\u732e\uff1aman od<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;\u4e0d\u79ef\u8dec\u6b65\uff0c\u65e0\u4ee5\u81f3\u5343\u91cc&#8221; \u300a\u529d\u5b66\u300b \u67e5\u770b\u6587\u672c\u6587\u4ef6\u4f7f\u7528vim\/less\u5c31\u8db3\u591f\u4e86\uff0c\u4f46\u5982\u679c\u60f3\u8981\u67e5\u770b\u4e00\u4e9b\u5176\u4ed6\u4e8c\u8fdb\u5236\u6587\u4ef6\uff08\u4f8b\u5982DB\u7684\u6570\u636e\u6587\u4ef6\u3001\u7a0b\u5e8f\u7684\u4e8c\u8fdb\u5236\u4ee3\u7801\uff09\u5219\u501f\u52a9\u4e8eod\/hexdump\u8fd9\u4e9b\u5de5\u5177\u4f1a\u5f88\u65b9\u4fbf\uff0c\u8fd9\u91cc\u4f1a\u901a\u8fc7\u4e00\u4e9b\u5b9e\u4f8b\u6765\u8be6\u7ec6\u4ecb\u7ecdod\u547d\u4ee4\u7684\u76f8\u5173\u53c2\u6570\u3002 1. od\u53c2\u6570\u8be6\u89e3 $od -j 49152 -N 38 -w4 -A d -t x1 -v tmp_test.ibd 0049152 fd 6f fb 70 0049156 00 00 00 03 0049160 ff ff ff ff 0049164 ff ff ff ff 0049168 00 00 00 03 0049172 ba 92 ac 0c 0049176 45 bf 00 00 0049180 00 00 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","inline_featured_image":false,"_tocer_settings":[],"footnotes":""},"categories":[27],"tags":[121],"class_list":["post-2407","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/2407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/comments?post=2407"}],"version-history":[{"count":13,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/2407\/revisions"}],"predecessor-version":[{"id":2420,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/2407\/revisions\/2420"}],"wp:attachment":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/media?parent=2407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/categories?post=2407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/tags?post=2407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}