How to repack zip files without using tmp dir?

I have many zip files that I need to repack / recompress in order to get around the error in MediaWiki 0.1.18.

I can do it with

#!/bin/bash

for f in *zip; do
   cd tmp
   rm -rf *
   unzip ../"$f"
   zip -r ../"$f" *
   cd ..
done

but is there any way to do this, for example. with handsets or perhaps with a zip option?

+3
source share
4 answers

You can not. If you send some bits to zip, it has no way of knowing when one file ends and a new one begins.

In fact, you can write your own program to do the job, but from your description this seems redundant. Also, you do not know which error you are correcting, so other workarounds cannot be suggested.

+2
source
gzip -d -c old.gz | gzip >new.gz
+6

AdvanceCOMP, , . ZIP GZ ( ) . ( , , , .)

+2

, , :

zipsplit -n 2147483648 zip 2GiB . zip , , .

+1

All Articles