I want to compress a file with tar but I'd like to know if its possible to do it while splitting the files.

I know that in windows is possible to do this with winrar, I also know I can use split but I would then have to unsplit this from Linux

  • 1
    On a different note, it is kind of incorrect to say 'compressing' with tar. Tar does not compress file, it only archives the directory as a single file. It compresses only when -z option is used.
    – Sreeraj
    Dec 22, 2014 at 4:37

2 Answers 2


You can send the output of tar to stdout and then pipe this into the split program.

tar cvzf - ./path/to/dir | split --suffix-length=LENGTH --bytes=SIZE - chunkedTar

Choose your suffix length and File sizes man split

To un-split, concatenate the files in the correct order and pipe that into tar.

cd where_you_want_to_untar
cat /path_to_chunks/chunkedTar* | tar xvzf -

Actually, it appears that files split under Linux with split are able to be reassembled in Windows using copy.

See the related question and answer here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .