Possible Duplicate:
How to split a tar file into smaller parts at file boundaries?

How can I create a multipart tar file in Linux?

link|improve this question
It may be a duplicate, but seriously... how many people would search for "tar smaller parts" vs "tar multipart"? yeah.. – hopeseekr Oct 13 '10 at 16:54
Similar, but not the same. The linked question @Sathya points to is more complex and requires a more complicated solution. – Ian C. Oct 13 '10 at 19:46
feedback

closed as exact duplicate by Sathya, Nifle, Diago Oct 13 '10 at 7:47

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

2 Answers

up vote 3 down vote accepted

You can use the split command to split an archive in to multiple files. For example, if I wanted my archive stored in 1 MByte files:

tar -cvf - <stuff to put in archive> | split --bytes=1m --suffix-length=4 --numeric-suffix - myarchive.tar.

And when I want to recombine and untar:

cat myarchive.tar.* | tar xvf -
link|improve this answer
Awesome. Thanks. – hopeseekr Oct 13 '10 at 16:52
feedback

Use tar c to create the tar archive, and specify the k size-in-kbytes parameter to control the maximum size of each part. You'll end up with ((original size)/(part size) + 1) parts.

link|improve this answer
Where did you get the "k size-in-kbytes parameter"? Can't seem to find it on Linux. – sleske Oct 13 '10 at 0:30
saw it here: computerhope.com/unix/utar.htm – Traveling Tech Guy Oct 13 '10 at 4:08
Not in Gentoo linux, unfortunately. – hopeseekr Oct 13 '10 at 16:53
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.