Linux – How to create multipart tar file in Linux

command linelinuxtar

How can I create a multipart tar file in Linux?

Best Answer

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 -