{"id":136,"date":"2023-04-05T17:05:40","date_gmt":"2023-04-05T15:05:40","guid":{"rendered":"https:\/\/gilbert.busana.lu\/?p=136"},"modified":"2023-04-05T17:05:40","modified_gmt":"2023-04-05T15:05:40","slug":"find-differences-between-folders","status":"publish","type":"post","link":"https:\/\/www.homeserver.lu\/?p=136","title":{"rendered":"Find differences between folders"},"content":{"rendered":"\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>diff -rq \/...\/folder1 \/...\/folder2<\/code><\/pre><\/div>\n\n\n\n<p>The r flag assures that each directory is recursively looked at.<br>The q flag activates the brief mode: without this flag, diff will tell us the actual line-by-line differences for any files that exist in both locations but are not identical.<\/p>\n\n\n\n<p>To check differences between remote shares:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>diff -rq \/Volumes\/Movies-1 \/Volumes\/Movies-2<\/code><\/pre><\/div>\n\n\n\n<p>This also works with rsync:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>rsync -avun $SOURCE $TARGET<\/code><\/pre><\/div>\n\n\n\n<p>In case you want to avoid corrupt files,  you want to check for checksums too:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>rsync -avnc $SOURCE $TARGET<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The r flag assures that each directory is recursively looked at.The q flag activates the brief mode: without this flag, diff will tell us the actual line-by-line differences for any files that exist in both locations but are not identical. To check differences between remote shares: This also works with rsync: In case you want [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-136","post","type-post","status-publish","format-standard","hentry","category-cli"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=136"}],"version-history":[{"count":5,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":141,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/136\/revisions\/141"}],"wp:attachment":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}