{"id":494,"date":"2014-12-25T07:02:12","date_gmt":"2014-12-25T07:02:12","guid":{"rendered":"http:\/\/www.tech-g.com\/?p=494"},"modified":"2016-11-09T08:07:51","modified_gmt":"2016-11-09T08:07:51","slug":"split-a-40-gb-file-into-5gb-files","status":"publish","type":"post","link":"https:\/\/www.voodoo.business\/blog\/2014\/12\/25\/split-a-40-gb-file-into-5gb-files\/","title":{"rendered":"Split a 40 GB file into 5GB files"},"content":{"rendered":"<p>I would like to employ multiple connections to download a file from my server on the internet, the best way to do that is to split the file into 5GB chunks&#8230;<\/p>\n<p>In linux, to split a file, i don&#8217;t need to decompress it then re-compress it in chunks, the easiest way is to use this command<\/p>\n<p><code class=\"snippet\">split -b 5120MB file_to_split.bin<\/code><\/p>\n<p>If you want the split parts to have a numeric suffix for example, try this, pay attention to the dot at the end which the numeric suffix will follow<\/p>\n<p>split -d -b 9000m &#8211;suffix-length 3 myfile.zip myfile.zip.<\/p>\n<p>The result to the above would be<\/p>\n<p>myfile.zip.000 myfile.zip.001 myfile.zip.002 etc&#8230;<\/p>\n<p>That&#8217;s it, happy downloading<\/p>\n<p>Now, to put it back together (Assuming your system orders them correctly by name ;))<\/p>\n<p>cat file_to_split.bin.* &gt; file_to_split.bin<\/p>\n<p>If it does not or your dont want to take any chances,<\/p>\n<p>cat\u00a0file_to_split.bin.000\u00a0file_to_split.bin.001\u00a0file_to_split.bin.003 &gt; file_to_split.bin<\/p>\n<p>To combine files split up with linux split on windows, you can use the copy command to concatenate them such as<\/p>\n<p>copy \/b xaa + xab + xac + xad + xae + xaf + xag + xah + xai resulting.tar.bzip2<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I would like to employ multiple connections to download a file from my server on the internet, the best way to do that is to split the file into 5GB chunks&#8230; In linux, to split a file, i don&#8217;t need to decompress it then re-compress it in chunks, the easiest way is to use this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-494","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/comments?post=494"}],"version-history":[{"count":6,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/494\/revisions"}],"predecessor-version":[{"id":781,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/494\/revisions\/781"}],"wp:attachment":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/media?parent=494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/categories?post=494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/tags?post=494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}