[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how do I extract a 2.6 gigabyte .tar.gz file ?



On Wed, Oct 28, 1998 at 10:13:59PM -0500, Darxus wrote:
> On 28 Oct 1998, Gary L. Hennigan wrote:
> 
> > That was an excellent idea, unfortunately Darxus has already tried
> > this and it didn't work for him. Perhaps gzip tries to read the whole
> > file and even though, in your case, the file is truncated it'll do
> > what it can. In Darxus' case that means it's trying to read past the
> > 2GB limit and that's a no-no under 80x86 based Linux systems.
> > 
> > However, now knowing that gzip will in fact decompress a file that's
> > lost it's tail, Darxus could try to write a little C program that calls
> > truncate() to truncate his file to around 2GB (a little less might be
> > a good idea) and see what he can do with it. 
> > 
> > Of course I'd treat this idea as a last resort. I have NO idea if
> > Darxus can copy that file, for a backup before trying the truncate()
> > thing, and it'd be a Bad Thing (TM) if he truncated the existing file
> > only to find out it wouldn't work. Plus, I don't know if truncate()
> > will work on a file greater than 2GB?
> 
> Unfortunately I cannot back it up.  I only have 4.3gb of fat32 space
> total.  And it would be my guess that truncate() would need to use the
> function that I'm guessing every other program is failing on because it
> can only handle 2^31 bytes.  I'd love to just see somebody who knows what

I think that dd will have no problem to truncate you file : 
dd if=tarfile of=just_a_try bs=1k count=2000000 would give you a file
named just_a_try containing the beginning of your tarfile but limited
to a size of slightly less than 2GB. Just ajust the count value if you
don't have enough space. With the skip parameter you'll be able to get
the end of your file too.

I've tried that with small file and it works and dd is able to cope with
partition of any size I think, so : it should work.

-- 
Laurent PICOULEAU
   lcrpic@a2points.com


Reply to: