Skip to content

Instantly share code, notes, and snippets.

@LubosRemplik
Created October 16, 2013 18:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LubosRemplik/7012852 to your computer and use it in GitHub Desktop.
Save LubosRemplik/7012852 to your computer and use it in GitHub Desktop.
Split tar files and cat them together again.
You can use split for this:
tar czpvf - /path/to/archive | split -d -b 100M - tardisk
This tells tar to send the data to stdout, and split to pick it from stdin - additionally using a numeric prefix (`-d`), a chunk size (`-b`) of 100M and using 'disk' as the base for the resulting filenames (tardisk00, tardisk01, etc.).
To extract the data afterwards you can use this:
cat tardisk* | tar xzpvf -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment