bzip2split

Dan Nelson dnelson at allantgroup.com
Sun Dec 21 21:26:12 UTC 2008


In the last episode (Dec 21), Kelly Jones said:
> 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
> 
>   % 'split' will cut the file inside a bzip2 "block", rendering the
>   first/last blocks of each file unreadable.

The bzip2recover command will split each block of data in a bzip2 file
into separate .bz2 files; you can then cat them back together to create
runs of files however big you want.  Even though the resulting files
have bzip2 headers between blocks, bunzip2 will skip over them when
extracting.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list