Split tar.bz2 file and extract each individually

linux, tar, ubuntu

Solution

I don't think it's easily possible. A `.tar.bz2` is a single stream, it doesn't have an index like `zip` that would allow skipping to the start of a particular file within the archive. You can split the file using `split` utility, and than `cat` the parts and extract them (you can do this via stdin to avoid re-creating the pasted file on disk). The first fragment will be possible to extract separately (except for the last file in it which will probably be damaged), but further fragments will not be usable without the onces that come before them.

Problem

Can I split a large tar.bz2 file into several smaller files and extract those small tar.bz2 files individually in Ubuntu? Thanks,

Original source