Problem compressing tar file

This is a discussion on Problem compressing tar file within the Linux General forums, part of the Linux Forums category; Hi, I have a 2GB tar file that I need to compress. I have tried gzip, zip, and compress. With ...


Go Back   Usenet Forums > Linux Forums > Linux General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-06-2007
Michael
 
Posts: n/a
Default Problem compressing tar file

Hi,

I have a 2GB tar file that I need to compress. I have tried gzip, zip,
and compress. With each one of these tools, I get errors when I
decompress. Is it that these tools cannot handle a file this large?
What can I do?

Any help is greatly appreciated,

Michael

Reply With Quote
  #2 (permalink)  
Old 08-06-2007
ToddAndMargo
 
Posts: n/a
Default Re: Problem compressing tar file

Michael wrote:
> Hi,
>
> I have a 2GB tar file that I need to compress. I have tried gzip, zip,
> and compress. With each one of these tools, I get errors when I
> decompress. Is it that these tools cannot handle a file this large?
> What can I do?
>
> Any help is greatly appreciated,
>
> Michael
>


Michael,

I have no clue why you are having problems
with gzip, etc.

But, you can compress a tar ball with the tar command when you
create the ball. And, you can create REALLY big tar balls!

From the man page (man tar), check out the -j (bzip2)
and -z (zip) options. For example:

tar -zvcf MyTarBall.gz MyFileDirectory
tar -jvcf MyTarBall.bz2 MyFileDirectory

You can use any extension (bz2, gz, etc.) but
if others are going to use it, better stick to the
convention.

HTH,
-T
Reply With Quote
  #3 (permalink)  
Old 08-06-2007
David L. Johnson
 
Posts: n/a
Default Re: Problem compressing tar file

Michael wrote:
> Hi,
>
> I have a 2GB tar file that I need to compress. I have tried gzip, zip,
> and compress. With each one of these tools, I get errors when I
> decompress. Is it that these tools cannot handle a file this large?
> What can I do?


The previous suggestion of creating the compressed archive initially is
probably a good one. But you may run into the same problem again. A
large archive like that will use up a lot of space, both on the disk and
in RAM, while it is being compressed/uncompressed. If you have only
limited RAM space, add a temporary extra swapfile, then try again (and,
be prepared to wait, since if you have to swap large chunks of the file
out of real RAM, it will really slow down). It may be that the
compression/expansion will save the data in a temporary file, so you may
run into problems if you don't have enough /tmp space, and, of course,
you need enough space to write out the archive -- in addition to the
space taken up by the compressed one.

Of course, these are just guesses. A better guess would be helped by
the details of the error messages.

--

David L. Johnson

What is objectionable, and what is dangerous about extremists is not
that they are extreme, but that they are intolerant.
--Robert F. Kennedy
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:19 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0