[Techtalk] bzip2split

R. Daneel Olivaw linuxchix at r-daneel.com
Mon Dec 22 21:35:05 UTC 2008


Hi there,

Le dimanche 21 décembre 2008 à 13:23 -0700, Kelly Jones a écrit :
> Can I split a large (4G+) bzip2 file into smaller bzip2 files? Notes:
> 
>  % Obviously, 'split' won't work for 2 reasons:
> 
>   % Each chunk won't have the BZIP2 header

true, that's not what 'split' is for

>   % 'split' will cut the file inside a bzip2 "block", rendering the
>   first/last blocks of each file unreadable.

I don't really understand that. If you split, say, file myFile.bz2 into
2 parts, you got myFile.bz2.part1 & myFile.bz2.part2.
You will not be able to unbzip2 parts separatly.
But if you do something like : 
cat myFile.bz2.part1 myFile.bz2.part2 | bzip2 -d > myFile
or
cat myFile.bz2.part1 myFile.bz2.part2 > myFile.bz2 && bzip2 -d
myFile.bz2
you should recover your initial uncompressed file.

Or do I miss something here  :p

Read you soon,
R. Daneel Olivaw,
The Human Robot Inside.



More information about the Techtalk mailing list