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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 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 |
|
|||
|
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 |