{"id":156,"date":"2007-09-24T22:30:17","date_gmt":"2007-09-25T05:30:17","guid":{"rendered":"http:\/\/messofpottage.com\/blog\/?p=156"},"modified":"2007-09-24T22:30:17","modified_gmt":"2007-09-25T05:30:17","slug":"rsync-and-the-trailing-slash","status":"publish","type":"post","link":"https:\/\/accretiondisc.com\/blog\/2007\/09\/24\/rsync-and-the-trailing-slash\/","title":{"rendered":"rsync and the trailing slash"},"content":{"rendered":"<p>There may be no better piece of software in general use today than <a href=\"http:\/\/samba.anu.edu.au\/rsync\/\">rsync<\/a>. It is the heat. Without it, it would be practically impossible to backup data.<\/p>\n<p>Full stop.<\/p>\n<p>But.<\/p>\n<p>I don&#8217;t think I will ever figure out what to do about the trailing slash. If you read the man page you will see that<\/p>\n<blockquote>\n<pre>rsync (options) src dest\n<\/pre>\n<\/blockquote>\n<p>results in a copy of <em>src<\/em> being put in <em>dest<\/em>, but<\/p>\n<blockquote>\n<pre>rsync (options) src\/ dest\n<\/pre>\n<\/blockquote>\n<p>results in copies of the <em>contents<\/em> of <em>src<\/em> being put in <em>dest<\/em>.<\/p>\n<p>This is actually pretty cool. Except that bash&#8217;s tab-completion slaps a trailing slash at the end of any directory, so if you&#8217;re backing up <code>foo\/<\/code> and <code>bar\/<\/code> you have to be extra-careful that you don&#8217;t make a mess of things.<\/p>\n<p>(Or I supposed you could put<\/p>\n<blockquote>\n<pre>set mark-directories off\n<\/pre>\n<\/blockquote>\n<p>in your .<code>inputrc<\/code> file.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There may be no better piece of software in general use today than rsync. It is the heat. Without it, it would be practically impossible to backup data. Full stop. But. I don&#8217;t think I will ever figure out what to do about the trailing slash. If you read the man page you will see [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[52],"tags":[],"class_list":["post-156","post","type-post","status-publish","format-standard","hentry","category-technology"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paRqpr-2w","_links":{"self":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/comments?post=156"}],"version-history":[{"count":0,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/156\/revisions"}],"wp:attachment":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/media?parent=156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/categories?post=156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/tags?post=156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}