{"id":359,"date":"2009-02-27T17:20:59","date_gmt":"2009-02-27T13:20:59","guid":{"rendered":"http:\/\/www.unixpin.com\/wordpress\/?p=359"},"modified":"2009-03-02T15:14:22","modified_gmt":"2009-03-02T11:14:22","slug":"howto-compare-files-content-in-directories","status":"publish","type":"post","link":"https:\/\/www.unixpin.com\/?p=359","title":{"rendered":"\u0421\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u0445"},"content":{"rendered":"<p>\u041d\u0430 \u0434\u043d\u044f\u0445 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0430 Sun Explorer-\u0430, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u043c \u0432 \u043f\u043e\u043b\u0433\u043e\u0434\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0438\u0447\u0435\u0433\u043e unix-\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u043d\u0435 \u0431\u044b\u043b\u043e, \u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0441 \u0445\u043e\u0434\u0443 \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 2 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0441\u043e\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f. \u0412\u043e\u0442&#8230; \u0441\u0445\u043e\u0434\u0443 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 perl. \u0418\u0442\u0430\u043a, \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439<\/p>\n<ul> \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0444\u0430\u0439\u043b\u044b, \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435<br \/>\n\u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0444\u0430\u0439\u043b\u044b, \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043f\u043e \u0434\u0430\u0442\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0443<br \/>\n\u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0444\u0430\u0439\u043b\u044b, \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043f\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/ul>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 perl, \u0442\u043e \u043f\u043e\u0434 Windows \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e perl (<a href=\"http:\/\/downloads.activestate.com\/\">ActivePerl<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440) \u0438\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c <a href=\"https:\/\/www.unixpin.com\/wp-content\/uploads\/2009\/03\/comparedirs.zip\">\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a<\/a>.<\/p>\n<p><!--more--><br \/>\n\u0412 STDERR \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>\u0412 STDOUT \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u0432 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0435 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<br \/>\nC:&gt; comparedirs.pl -content<br \/>\n-d1=c:\/explorer.8eeeeee.e25k-2008.05.28.17.56<br \/>\n-d2=c:\/explorer.8eeeeee.e25k-2009.01.20.11.24  &gt; c:\/tmp\/diff.log 2&gt; c:\/tmp\/messages.log<\/p>\n<p>C:\\TEMP&gt;perl comparedirs.pl -d1=c:\/temp\/2 -d2=c:\\temp\\1<br \/>\nFile C:\\temp\\1\\ndd\\udp\\aaa do not exist!<\/p>\n<p>C:\\TEMP&gt;perl comparedirs.pl -content -d1=c:\/temp\/2\/ndd\/ce.6 -d2=c:\\temp\\1\\ndd\\ce.6<br \/>\nFiles C:\\temp\\2\\ndd\\ce.6\\accept_jumbo.out and C:\\temp\\1\\ndd\\ce.6\\accept_jumbo.out have different con<br \/>\ntent<br \/>\n*** C:\\temp\\2\\ndd\\ce.6\\accept_jumbo.out Wed Feb 18 03:51:32 2009<br \/>\n&#8212; C:\\temp\\1\\ndd\\ce.6\\accept_jumbo.out Wed May 28 21:06:31 2008<br \/>\n***************<br \/>\n*** 1 ****<br \/>\n! 0<br \/>\n&#8212; 1 &#8212;-<br \/>\n! 1<\/p>\n<p><a href=\"https:\/\/www.unixpin.com\/wp-content\/uploads\/2009\/02\/comparedirspl.txt\"><strong>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 (\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434)\/Download source comparedirs<\/strong><\/a><\/p>\n<p><a href=\"https:\/\/www.unixpin.com\/wp-content\/uploads\/2009\/03\/comparedirs.zip\"><strong>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u043e\u0434 Win32\/ Download binary for Win32<\/strong><\/a><\/p>\n<p>PS \u0430\u043d\u0430\u043b\u043e\u0433 \u043d\u0430 shell \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439:<br \/>\ncd \/dir1;<br \/>\nfor p in `find . -print`; do<br \/>\nif -f \/dir1\/$p &amp;&amp; -f \/dir2\/$p; then<br \/>\ndiff \/dir1\/$p \/dir2\/$p<br \/>\nfi<br \/>\ndone<\/p>\n<p>PSPS 02.03.2009 &#8212; \u0414\u043e\u0431\u0430\u0432\u0438\u043b \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u043f\u043e\u0434 windows<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041d\u0430 \u0434\u043d\u044f\u0445 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0430 Sun Explorer-\u0430, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u043c \u0432 \u043f\u043e\u043b\u0433\u043e\u0434\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0438\u0447\u0435\u0433\u043e unix-\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u043d\u0435 \u0431\u044b\u043b\u043e, \u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0441 \u0445\u043e\u0434\u0443 \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 2 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0441\u043e\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f. \u0412\u043e\u0442&#8230; \u0441\u0445\u043e\u0434\u0443 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 perl. \u0418\u0442\u0430\u043a, \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0444\u0430\u0439\u043b\u044b, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,5,24,25,4,93],"tags":[589,574,588,577,575,280,211,125,590,576,386,1019,207,210,587,584,591,279,582,592,583,581,586,593,208,579,578,580,213,585],"class_list":["post-359","post","type-post","status-publish","format-standard","hentry","category-perl","category-shell","category-hpux","category-linux","category-solaris","category-unix-tru64","tag-check","tag-compare","tag-comparedirs","tag-content","tag-directory","tag-download","tag-file","tag-find","tag-folder","tag-free","tag-howto","tag-perl","tag-script","tag-search","tag-tool","tag-tree","tag-windows","tag-279","tag-582","tag-592","tag-583","tag-581","tag-586","tag-593","tag-208","tag-579","tag-578","tag-580","tag-213","tag-585"],"_links":{"self":[{"href":"https:\/\/www.unixpin.com\/index.php?rest_route=\/wp\/v2\/posts\/359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.unixpin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.unixpin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.unixpin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.unixpin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=359"}],"version-history":[{"count":8,"href":"https:\/\/www.unixpin.com\/index.php?rest_route=\/wp\/v2\/posts\/359\/revisions"}],"predecessor-version":[{"id":369,"href":"https:\/\/www.unixpin.com\/index.php?rest_route=\/wp\/v2\/posts\/359\/revisions\/369"}],"wp:attachment":[{"href":"https:\/\/www.unixpin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.unixpin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.unixpin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}