Re: splitting tar.gz files


Subject: Re: splitting tar.gz files
From: Mike Tibor (tibor@lib.uaa.alaska.edu)
Date: Fri Jan 09 2004 - 11:07:55 AKST


On Fri, 9 Jan 2004, Justin Dieters wrote:

>
> 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?

You might try cpio or afio. I'm not a cpio man, but I assume it works
like afio in that when you specify compression, it compresses each file
before adding it to the archive vs. the tar way.

Mike

---------
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:07:57 AKST