2

I've run the following command: zip -r -s 200M myzip folder to compress the folder into multiple zip files (200M each).

I now have a small myzip.zip (7mb) file and the files:

myzip.z01
myzip.z02
myzip.z03
...

and so on.

The issue is that I cannot unzip the content. I'm running unzip unix archive.zip but I get "bad zipfile offset (lseek)". Furthermore, I need to extract them in Windows environment as well, and there I only have Windows 7 extractor I guess.

thanks

2 Answers 2

2

Judging from your previous questions, you're using OS X with Zip 3.0 and UnZip 5.52. If I zip some files with

zip -s 5m -r test test/

I get several files, including one with the .zip extension. Running

unzip test.zip

works just fine and deflates all the contents.

Zip has the problem that some files can not be read on other systems, that's why I would suggest trying different programs like @Sandeep suggested.

Fixing archive

You can also try to fix the original:

zip -F archive.zip --out archive-fixed
zip -FF archive.zip --out archive-fixed

Alternatives

I don't know if you really need to use Zip, but I think you might be better off using Tar and GZip.

tar cvf archive.tar.gz directory
split --line-bytes=600m archive.tar.gz part

and then again concatenate the files, either using cat on Unix-like systems or copy on Windows.

cat part* > archive.tar.gz
copy /b part1+part2 archive.tar.gz

Extract the file on Unix systems by double clicking. 7Zip on Windows is a good tool for that purpose.

2
  • So what compression format you suggest. Yeah exactly I'm compressing on mac and uncompressing on Windows.
    – aneuryzm
    Apr 19, 2011 at 12:51
  • @Patrick I added Tar+GZip as an alternative. You might want to give it a try!
    – slhck
    Apr 19, 2011 at 12:53
0

In Windows you can try

All work well with extraction, some work and some don't with what you're trying to achieve just trial and error.

2
  • I'm now using 7Zip and I get "unsupported compression method" error. I will try Winrar, but do you think it is the extraction software, or rather a bad compression ?
    – aneuryzm
    Apr 19, 2011 at 12:30
  • It is most likely bad compression, but some software can handle corrupted files, such as Winrar, it has the possibility to fix corrupt archives. Apr 19, 2011 at 17:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .