{"id":29,"date":"2007-01-02T20:01:29","date_gmt":"2007-01-03T03:01:29","guid":{"rendered":"http:\/\/www.dreness.com\/blog\/archives\/29"},"modified":"2007-01-02T20:01:29","modified_gmt":"2007-01-03T03:01:29","slug":"the-opposite-of-split-is-cat","status":"publish","type":"post","link":"https:\/\/dreness.com\/blog\/archives\/29","title":{"rendered":"The opposite of split is cat."},"content":{"rendered":"<p><code>\/usr\/bin\/split<\/code> and <code>\/bin\/cat<\/code>, that is. Why is this useful information? Let&#8217;s imagine a wonderful world in which your web host gives you oodles of bandwidth and disk quota, and then one day secretly enacts a policy that disallows access to files over a certain (largish) size. Say, something like:<br \/>\n<code>[Tue Jan 02 13:07:24 2007] [error] [client x.x.x.42] (75)Value too large for defined data type: access to \/some\/big\/file.omg failed<\/code><\/p>\n<p>Let&#8217;s also suppose that this file is indeed really big, and you totally don&#8217;t want to go through the pain of segmenting it locally and then uploading it again. If the server and client(s) are unixy, here is your salvation:<\/p>\n<p><code>split -b 500m BigFile BigFileParts_<\/code><\/p>\n<p>This will segment your file into chunks that are 500 MB in size (though obviously the last one will probably be less). You will end up with files named BigFileParts_aa, BigFileParts_ab, and so on. Now you can download them, presuming 500 MB is beneath the threshold of the policy which blocks big file xfers; adjust accordingly.<\/p>\n<p>Once downloaded, put them back together with cat, appending from the back to the front:<br \/>\n<code>cat BigFileParts_ac >> BigFileParts_ab<br \/>\ncat BigFileParts_ab >> BigFileParts_aa<br \/>\nmv BigFileParts_aa BigFile<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/usr\/bin\/split and \/bin\/cat, that is. Why is this useful information? Let&#8217;s imagine a wonderful world in which your web host gives you oodles of bandwidth and disk quota, and then one day secretly enacts a policy that disallows access to &hellip; <a href=\"https:\/\/dreness.com\/blog\/archives\/29\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-os-x","category-os-x-server"],"_links":{"self":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":0,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"wp:attachment":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}