Friday, July 22, 2005

Unzipping large files in Linux

Infozip's Unzip program has certain file size limits. It may not support files whose unzipped size is larger than 4GB and instead produce this error:
skipping: yeas3/yeas3.TRC need PK compat. v4.5 (can do v2.1)
Support for unzipping large files will come with Unzip 6.x - the current version is 5.52.
So what if you want to unzip a large file on unix *now*? You could either unzip on Windows with any number of utilities (7-zip/PowerArchiver/Izarc) and somehow get the file over to Linux/Unix - or locate the unix version of 7-zip's command line utility (7za) called p7zip. All you need to do is build the executable from source:
make
make install
Then run:
7za x file.zip [filename ...]
Till unzip 6.0 arrives, this one is going to be one fixture on my machine.

2 comments:

Rijo Roy said...

So what is the command line for installing p7zip in linux.Please guide me.

Thanks
Rijo

Unknown said...

Download p7zip from the sourceforge page (Direct link: http://sourceforge.net/projects/p7zip/files/p7zip/9.20.1/p7zip_9.20.1_src_all.tar.bz2/download?_test=goal)

extract it using:
tar jxvf p7zip_9.20.1_src_all.tar.bz2
Change to the extracted p7zip directory
cd p7zip_9.20.1
Build the command line tools:
make all3
Now install them
sudo make install
You should get 7z, 7zr, 7za all installed in /usr/local/bin

If your PATH includes /usr/local/bin, you can just execute:
7z
Otherwise use the complete path to execute. Eg:
/usr/local/bin/7z ...