I know this is possible with a botched unTAR, although I can't recall the exact command…. but is it possible to "undo" a recent "unzip" command, in this case, using the mac terminal?
This is using /usr/bin/unzip
on 10.7, with UnZip 5.52.
Lets say I started with a folder structure like this….
admin$ pwd
/usr/local/src
admin$ ls
pots pans scrubbers.zip
admin$ unzip scrubbers.zip
admin$ ls
pots pans scrubbers.zip
zebraturd.doc README.md morestuffididntmeantoputhere.py cleanme.junkmail
surfraw.2.html scrubbers.explaination
how can i just "rezip" or parse the zip file in reverse?
there is a section in the zip file that sorta lists the files in the archive, although quite seriously mangled.. for example..
0L'†C 0L'†C !∏V≤B PK&Å‘:√@`¢îF3$ Lmacos/lib/libexiv2.2.1.0.dylib
without manually sifting through that list, is there a magic bullet for this?
Best Answer
You could try
or
and if you have spaces in filenames
check that the output is sensible and then change
echo
forrm
. In particular check that your zipfile isn't listed in the output. This isn't perfect as it will leave directories untouched but it may be easier than wading through it all by hand.