Split Files Into Smaller Files

By  on  

As fast as internet connections have gotten over the years, it seems the size of files we want to share has grown faster.  Whether it's archive (ZIP), video, or any other host of potentially large file types, it's still tricky to put these large files somewhere to download since many storage providers have file size limits.

Splitting archive and other files into small pieces is actually quite easy with the split utility.  By using split to chunk files apart, and cat to put them back together, we can skirt maximum file size limitations and fears of connection problems messing up large file downloads:

split -b 1m Turok.zip TUR

The example above splits a ZIP file into 1MB chunks with a file name prefix of TUR.  To put them back together we'll use cat:

cat TUR* > TurokRebuilt.zip

The chunked files are properly rebuilt!

Split Files

I've seen this practice used for years -- ever since my bad boy days of pirating applications and games.  Splitting and reassembling files seemed like magic back then -- little did I know how easy it was!

Recent Features

  • By
    How I Stopped WordPress Comment Spam

    I love almost every part of being a tech blogger:  learning, preaching, bantering, researching.  The one part about blogging that I absolutely loathe:  dealing with SPAM comments.  For the past two years, my blog has registered 8,000+ SPAM comments per day.  PER DAY.  Bloating my database...

  • By
    How to Create a Twitter Card

    One of my favorite social APIs was the Open Graph API adopted by Facebook.  Adding just a few META tags to each page allowed links to my article to be styled and presented the way I wanted them to, giving me a bit of control...

Incredible Demos

  • By
    Create a Dynamic Flickr Image Search with the Dojo Toolkit

    The Dojo Toolkit is a treasure chest of great JavaScript classes.  You can find basic JavaScript functionality classes for AJAX, node manipulation, animations, and the like within Dojo.  You can find elegant, functional UI widgets like DropDown Menus, tabbed interfaces, and form element replacements within...

  • By
    Introducing MooTools Templated

    One major problem with creating UI components with the MooTools JavaScript framework is that there isn't a great way of allowing customization of template and ease of node creation. As of today, there are two ways of creating: new Element Madness The first way to create UI-driven...

Discussion

  1. Kristaps

    Old days when you needed to split archives to fit them in multiple floppies. Uh and the middle part of the archive on that goddamn floppy disk got corrupted…

  2. For extra safety you can create a ‘Parchive’, or .PAR files from the split files (or an original, full-sized one). https://en.wikipedia.org/wiki/Parchive This allows damaged files to be repaired, without a huge overhead of storage.

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!