I'm still rather new to Unix and please forgive me if this is a simple question.
I have a bunch of old zipped files, ending in Z. Is there a way to gzip them -9, without having to uncompress/recomress? I am trying to get them max compressed.
Thank you!!
Last edited by smckech1972; 09-22-2011 at 10:37 AM..
Reason: Adding additional Information.
You must have enough free space to accomodate the new .gz file, before deleting the .Z file. The .Z file itself is not uncompressed to disk.
Even if gzip could further compress the .Z file, you still need enough space to store the .gz file while it's being created.
If space is so tight that you don't have enough room for the .gz file, then gzip it to another filesystem first. And depending on what's in the file, and the size and number of files, there's no guarantee that gzip will save you much anyway.
it is not a good idea trying to compress something that is already compressed. even if it works, you'd get much better ratio with unpacking first.
also archive is simpler.
btw, if you want max compression, try 7z (p7zip). with enough RAM for dictionary it can give very good results.