{"id":2252,"date":"2019-05-27T23:49:23","date_gmt":"2019-05-27T15:49:23","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=2252"},"modified":"2019-05-30T15:04:38","modified_gmt":"2019-05-30T07:04:38","slug":"od","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/od","title":{"rendered":"od\u547d\u4ee4 – \u8f93\u51fa\u6587\u4ef6\u5185\u5bb9"},"content":{"rendered":"\n

od\u547d\u4ee4\u4f1a\u8bfb\u53d6\u6240\u7ed9\u4e88\u7684\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u5e76\u5c06\u5176\u5185\u5bb9\u4ee5\u516b\u8fdb\u5236\u5b57\u7801\u5448\u73b0\u51fa\u6765\u3002 <\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>od [\u53c2\u6570] <\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n
-a  <\/td>\u6b64\u53c2\u6570\u7684\u6548\u679c\u548c\u540c\u65f6\u6307\u5b9a”-ta”\u53c2\u6570\u76f8\u540c <\/td><\/tr>
-A<\/td>\u9009\u62e9\u8981\u4ee5\u4f55\u79cd\u57fa\u6570\u8ba1\u7b97\u5b57\u7801 <\/td><\/tr>
-b <\/td>\u6b64\u53c2\u6570\u7684\u6548\u679c\u548c\u540c\u65f6\u6307\u5b9a”-toC”\u53c2\u6570\u76f8\u540c <\/td><\/tr>
-c  <\/td>\u6b64\u53c2\u6570\u7684\u6548\u679c\u548c\u540c\u65f6\u6307\u5b9a”-tC”\u53c2\u6570\u76f8\u540c <\/td><\/tr>
-d <\/td>\u6b64\u53c2\u6570\u7684\u6548\u679c\u548c\u540c\u65f6\u6307\u5b9a”-tu2″\u53c2\u6570\u76f8\u540c <\/td><\/tr>
-f  <\/td>\u6b64\u53c2\u6570\u7684\u6548\u679c\u548c\u540c\u65f6\u6307\u5b9a”-tfF”\u53c2\u6570\u76f8\u540c <\/td><\/tr>
-h <\/td>\u6b64\u53c2\u6570\u7684\u6548\u679c\u548c\u540c\u65f6\u6307\u5b9a”-tx2″\u53c2\u6570\u76f8\u540c <\/td><\/tr>
-i <\/td>\u6b64\u53c2\u6570\u7684\u6548\u679c\u548c\u540c\u65f6\u6307\u5b9a”-td2″\u53c2\u6570\u76f8\u540c <\/td><\/tr>
-j<\u5b57\u7b26\u6570\u76ee> <\/td>\u7565\u8fc7\u8bbe\u7f6e\u7684\u5b57\u7b26\u6570\u76ee <\/td><\/tr>
-l  <\/td>\u6b64\u53c2\u6570\u7684\u6548\u679c\u548c\u540c\u65f6\u6307\u5b9a”-td4″\u53c2\u6570\u76f8\u540c <\/td><\/tr>
-N<\u5b57\u7b26\u6570\u76ee> <\/td>\u5230\u8bbe\u7f6e\u7684\u5b57\u7b26\u6570\u76ee\u4e3a\u6b62 <\/td><\/tr>
-o <\/td>\u6b64\u53c2\u6570\u7684\u6548\u679c\u548c\u540c\u65f6\u6307\u5b9a”-to2″\u53c2\u6570\u76f8\u540c <\/td><\/tr>
-s<\u5b57\u7b26\u4e32\u5b57\u7b26\u6570> <\/td>\u53ea\u663e\u793a\u7b26\u5408\u6307\u5b9a\u7684\u5b57\u7b26\u6570\u76ee\u7684\u5b57\u7b26\u4e32 <\/td><\/tr>
-t<\u8f93\u51fa\u683c\u5f0f> <\/td>\u8bbe\u7f6e\u8f93\u51fa\u683c\u5f0f <\/td><\/tr>
-v <\/td>\u8f93\u51fa\u65f6\u4e0d\u7701\u7565\u91cd\u590d\u7684\u6570\u636e <\/td><\/tr>
-w<\u6bcf\u5217\u5b57\u7b26\u6570> <\/td>\u8bbe\u7f6e\u6bcf\u5217\u7684\u6700\u5927\u5b57\u7b26\u6570 <\/td><\/tr>
-x  <\/td>\u6b64\u53c2\u6570\u7684\u6548\u679c\u548c\u540c\u65f6\u6307\u5b9a”-h”\u53c2\u6570\u76f8\u540c <\/td><\/tr>
--help <\/td>\u67e5\u770b\u5e2e\u52a9\u4fe1\u606f <\/td><\/tr>
--version <\/td>\u663e\u793a\u7248\u672c\u4fe1\u606f <\/td><\/tr><\/tbody><\/table>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u521b\u5efa tmp \u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# echo abcdef g > tmp\n[root@linuxcool ~]# cat tmp  <\/pre>\n\n\n\n

\u4f7f\u7528 od \u547d\u4ee4\uff1a <\/p>\n\n\n\n

[root@linuxcool ~]# od -b tmp <\/pre>\n\n\n\n

\u4f7f\u7528\u5355\u5b57\u8282\u516b\u8fdb\u5236\u89e3\u91ca\u8fdb\u884c\u8f93\u51fa\uff0c\u6ce8\u610f\u5de6\u4fa7\u7684\u9ed8\u8ba4\u5730\u5740\u683c\u5f0f\u4e3a\u516b\u5b57\u8282\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# od -c tmp<\/pre>\n\n\n\n

\u4f7f\u7528ASCII\u7801\u8fdb\u884c\u8f93\u51fa\uff0c\u6ce8\u610f\u5176\u4e2d\u5305\u62ec\u8f6c\u4e49\u5b57\u7b26\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# od -t d1 tmp<\/pre>\n\n\n\n

\u4f7f\u7528\u5355\u5b57\u8282\u5341\u8fdb\u5236\u8fdb\u884c\u89e3\u91ca\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# od -A d -c tmp<\/pre>\n\n\n\n

<\/p>\n","protected":false},"excerpt":{"rendered":"

od\u547d\u4ee4\u4f1a\u8bfb\u53d6\u6240\u7ed9\u4e88\u7684\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u5e76\u5c06\u5176\u5185\u5bb9\u4ee5\u516b\u8fdb\u5236\u5b57\u7801\u5448\u73b0\u51fa\u6765\u3002 \u8bed\u6cd5\u683c\u5f0f\uff1aod [\u53c2\u6570] \u5e38\u7528\u53c2\u6570\uff1a -a […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2252"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=2252"}],"version-history":[{"count":6,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2252\/revisions"}],"predecessor-version":[{"id":2942,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2252\/revisions\/2942"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=2252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=2252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=2252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}