{"id":765,"date":"2019-04-23T22:16:36","date_gmt":"2019-04-23T14:16:36","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=765"},"modified":"2019-04-24T21:14:27","modified_gmt":"2019-04-24T13:14:27","slug":"cmp","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/cmp","title":{"rendered":"cmp\u547d\u4ee4 – \u6bd4\u8f83\u4e24\u4e2a\u6587\u4ef6\u662f\u5426\u6709\u5dee\u5f02"},"content":{"rendered":"\n
cmp\u547d\u4ee4\u6709\u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u4efb\u610f\u7c7b\u578b\u7684\u6587\u4ef6\uff0c\u82e5\u4e24\u4e2a\u6587\u4ef6\u76f8\u540c\u5219\u9ed8\u8ba4\u4e0d\u8f93\u51fa\u4efb\u4f55\u4fe1\u606f\uff0c\u82e5\u4e24\u4e2a\u6587\u4ef6\u4e0d\u540c\uff0c\u5219\u4f1a\u8f93\u51fa\u7b2c\u4e00\u4e2a\u4e0d\u540c\u4e4b\u5904\u7684\u5b57\u7b26\u548c\u5217\u6570\u7f16\u53f7\uff0c\u7ed3\u679c\u8f93\u51fa\u5230\u6807\u51c6\u8f93\u51fa\u3002 <\/p>\n\n\n\n
\u82e5\u4e0d\u6307\u5b9a\u4efb\u4f55\u6587\u4ef6\u540d\u79f0\u6216\u662f\u6240\u7ed9\u4e88\u7684\u6587\u4ef6\u540d\u4e3a”-“\uff0c\u5219cmp\u547d\u4ee4\u4f1a\u4ece\u6807\u51c6\u8f93\u5165\u8bbe\u5907\u8bfb\u53d6\u6570\u636e\u3002 <\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>cmp [\u53c2\u6570] [\u6587\u4ef6] [\u6587\u4ef6] <\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a\ufeff<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u6bd4\u8f83\u6587\u4ef6\u201ctempfile\u201d\u548c\u201ctempfile1\u201d(\u4e24\u6587\u4ef6\u76f8\u540c\u65f6\uff0c\u4e0d\u663e\u793a\u4efb\u4f55\u4fe1\u606f\uff0c\u4e24\u6587\u4ef6\u4e0d\u540c\u65f6)\uff1a<\/p>\n\n\n\n \u6bd4\u8f83\u6587\u4ef6\u201ctempfile\u201d\u548c\u201ctempfile1\u201d \uff0c\u4e0d\u663e\u793a\u9519\u8bef\u4fe1\u606f\uff1a<\/p>\n\n\n\n \u6bd4\u8f83\u6587\u4ef6\u201ctempfile\u201d\u548c\u201ctempfile1\u201d\uff0c\u6807\u793a\u51fa\u6240\u6709\u4e0d\u4e00\u6837\u7684\u5730\u65b9\uff1a<\/p>\n\n\n\n \u6bd4\u8f83\u6587\u4ef6\u201ctempfile\u201d\u548c\u201ctempfile1\u201d \uff0c\u6307\u5b9a\u4e00\u4e2a\u6570\u76ee\uff1a<\/p>\n\n\n\n \u6bd4\u8f83\u6587\u4ef6\u201ctempfile\u201d\u548c\u201ctempfile1\u201d , \u9664\u4e86\u6807\u660e\u5dee\u5f02\u5904\u7684\u5341\u8fdb\u5236\u5b57\u7801\u4e4b\u5916\uff0c\u4e00\u5e76\u663e\u793a\u8be5\u5b57\u7b26\u6240\u5bf9\u5e94\u5b57\u7b26\uff1a<\/p>\n\n\n\n cmp\u547d\u4ee4\u6709\u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u4efb\u610f\u7c7b\u578b\u7684\u6587\u4ef6\uff0c\u82e5\u4e24\u4e2a\u6587\u4ef6\u76f8\u540c\u5219\u9ed8\u8ba4\u4e0d\u8f93\u51fa\u4efb\u4f55\u4fe1\u606f\uff0c\u82e5\u4e24\u4e2a\u6587\u4ef6\u4e0d\u540c\uff0c\u5219\u4f1a\u8f93\u51fa\u7b2c\u4e00\u4e2a\u4e0d\u540c […]<\/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\/765"}],"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=765"}],"version-history":[{"count":8,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/765\/revisions"}],"predecessor-version":[{"id":1229,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/765\/revisions\/1229"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}--help<\/td> \u663e\u793a\u5e2e\u52a9<\/td><\/tr> -v\/--version<\/td> \u663e\u793a\u7248\u672c\u4fe1\u606f<\/td><\/tr> -s\/--quit\/--silent<\/td> \u4e0d\u663e\u793a\u9519\u8bef\u4fe1\u606f<\/td><\/tr> -l\/--verbose<\/td> \u6807\u793a\u51fa\u6240\u6709\u4e0d\u4e00\u6837\u7684\u5730\u65b9<\/td><\/tr> -i\/--ignore-initial<\/td> \u6307\u5b9a\u4e00\u4e2a\u6570\u76ee<\/td><\/tr> -c\/--print-chars<\/td> \u9664\u4e86\u6807\u660e\u5dee\u5f02\u5904\u7684\u5341\u8fdb\u5236\u5b57\u7801\u4e4b\u5916\uff0c\u4e00\u5e76\u663e\u793a\u8be5\u5b57\u7b26\u6240\u5bf9\u5e94\u5b57\u7b26<\/td><\/tr><\/tbody><\/table>\n\n\n\n [root@linuxcool ~]# cmp tempfile tempfile1
tempfile tempfile1 differ\uff1abyte 1, line 1<\/pre>\n\n\n\n[root@linuxcool ~]# cmp -s tempfile tempfile1<\/pre>\n\n\n\n
[root@linuxcool ~]# cmp -l tempfile tempfile1
1 12 151
2 151 167
8 167 12
cmp: EOF on tempfole1 after byte8<\/pre>\n\n\n\n[root@linuxcool ~]# cmp -i 2 tempfile tempfile1
tempfile tempfile1 differ\uff1abyte 6, line 1 <\/pre>\n\n\n\n[root@linuxcool ~]# cmp -c tempfile tempfile1
tempfile tempfile1 differ\uff1abyte 1, line 1 is 12 'J 151 i
<\/pre>\n","protected":false},"excerpt":{"rendered":"