Re: splitting tar.gz files


Subject: Re: splitting tar.gz files
From: Glen Johnson (glen.johnson@alaska.edu)
Date: Fri Jan 09 2004 - 10:48:58 AKST


Justin, That's a pretty big archive!

... I generally use "dd" to split things.

dd if=file.tar.gz of=file.tgz.01 bs=1M count=650
dd if=file.tar.gz of=file.tgz.02 bs=1M count=650 skip=650
dd if=file.tar.gz of=file.tgz.03 bs=1M count=650 skip=1300

Also, unless this is time critical, bzip2 has a better compression ratio.
For a 6GB gzip, bzip2 will likely do better than 5.4GB. But it tends to
take longer. And god only know how long for 12GB!

Hope that helps.

Glen

----- Original Message -----
From: "Justin Dieters" <enderak@gci.net>
To: <aklug@aklug.org>
Sent: Friday, January 09, 2004 10:28
Subject: splitting tar.gz files

>
> Hello all,
>
> I need to split up large tar.gz files into CD-sized volumes for burning to
CDs. The data is about 12 GB uncompressed, and about 6 GB compressed. In
the past, I have used WinRAR to do this on Windows (with .rar files, not
.tar.gz), but now I need to figure out how to do it with Linux (command-line
only). tar.gz is preferred, although I can use some other format if it
provides a better solution.
>
> So far I have came up with several solutions, but none are really ideal.
>
> 1) tar and gzip normally, then use 'split' - this is okay, but to extract
files, I would have to cat them back together into one big file again. A
lot of work if I only need one or two files.
>
> 2) tar using -M and then gzip the separate files - if I split into
CD-sized files, then gzip, there is lots of CD space wasted. Or if I try to
guess the compression amount, there's a good chance I will end up with
several volumes that won't fit onto a CD and will have to redo the operation
several times.
>
> 3) gzip all the files first, then tar them using -M - this works okay, but
each and every file then needs to be ungzipped after extracting the tar
file - not practical for a large # of files (unless I can come up with a
script that can do this automagically)
>
> 4) tar and gzip normally, and then tar again using -M - this would work
like I want it, but it's kind of convoluted having to tar twice
>
> Any better ideas, or suggestions?
>
> Thanks,
> Justin
>
>
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>
>

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Fri Jan 09 2004 - 11:05:34 AKST