Split A Big File Into Multiple TAR Files

So you have a big archive or big file that you can’t fit on a single storage (are there still such things that does not fit onto a USB these days? :D ). How do you split them up on Linux?

tar czvfp - /your/one/big/file-or-archive | split -d -b 102400000 - multifile-prefix

The result would be files like multifile-prefix00 .. multifile-prefixNN.

You can then put them back together with:

cat multifile-prefix* | tar xzvfp -

Nevertheless, go buy yourself bigger USB drives!

Wednesday, December 28th, 2011 Bash, Linux

Leave a Reply