subbarao@phoenix.Princeton.EDU (Kartik Subbarao) (12/06/90)
Something went fishy the other day when it appeared that all of my .ZIP files were corrupted for some unknown reason. The reason is kind of odd, and thats why I'm asking why. The general way I used to create ZIP files of everything in a directory was to do this: pkzip zipfile *.* del *.* qu zipfile.zip # i.e unerase the just created ZIP file however, it appears that deleting and undeleting a zip file somehow changes it because afterwards when I do a pkunzip -t (or whatever the flag is that verifies the stuff) pkzip finds problems that pkzipfix can't even fix. I compared the file sizes before unerasure and afterwards, and they're the same. Before I go and attack the problem in hex or something, is this or isn't this a bug and should or shouldn't be corrected? -Kartik (I need a new .signature -- any suggestions?) subbarao@{phoenix or gauguin}.Princeton.EDU -|Internet kartik@silvertone.Princeton.EDU (NeXT mail) -| SUBBARAO@PUCC.BITNET - Bitnet
bobmon@iuvax.cs.indiana.edu (RAMontante) (12/06/90)
subbarao@phoenix.Princeton.EDU (Kartik Subbarao) <4512@idunno.Princeton.EDU> : | Something went fishy the other day when it appeared that all of my .ZIP | files were corrupted for some unknown reason. The reason is kind of odd, | and thats why I'm asking why. The general way I used to create ZIP files | of everything in a directory was to do this: | | pkzip zipfile *.* | del *.* | qu zipfile.zip # i.e unerase the just created ZIP file I don't know just why this is bombing for you, but why bother? Why not just do pkzip -m zipfile *.* and let pkzip remove all the files that it archives after it successfully creates the archive? This is perfectly safe; pkzip doesn't try to remove the files until after it succeeds, so you won't lose any files if things die in the middle; and it's easier, simpler, and faster than your three-step procedure.
fritz@urz.unibas.ch (12/06/90)
In article <4512@idunno.Princeton.EDU>, subbarao@phoenix.Princeton.EDU (Kartik Subbarao) writes: > Something went fishy the other day when it appeared that all of my .ZIP > files were corrupted for some unknown reason. The reason is kind of odd, > and thats why I'm asking why. The general way I used to create ZIP files > of everything in a directory was to do this: > > pkzip zipfile *.* > del *.* > qu zipfile.zip # i.e unerase the just created ZIP file > > however, it appears that deleting and undeleting a zip file somehow changes > it because afterwards when I do a pkunzip -t (or whatever the flag is that > verifies the stuff) pkzip finds problems that pkzipfix can't even fix. Some files seem to be changed by deleting and unerasing with Norton's QU. I have discovered that when I wanted to unerase an emTeX font-library file. I couldn't use it anymore afterwards. Oliver Fritz, University of Basel, Switzerland
is@athena.cs.uga.edu ( Bob Stearns) (12/06/90)
Your problem is the way that QU selects clusters to add to the unerased file. As I understand it (and I have NOT gone deeply into to the code to verify this) the clusters are chosen consecutively from the free list. If your disk is badly fragmented, the original situation might have been: ZZZxZZZyZZZaZZZb before the erase where ZZZZZZZZZZZZ is the large zip and x, y, a, b are small files contributed to the zip. After the zip is recreated by QU, the FAT will show the pattern ZZZZZZZZZZZZ**** where ZZZZZZZZZZZZ is the zip file and **** is unused space. Obviously not what you wanted. The correct solution to your problem is to use PKZIP more effectively: PKZIP -m all *.* this will do what you want all in one command.
tcs@mailer.jhuapl.edu (12/07/90)
In article <4512@idunno.Princeton.EDU>, subbarao@phoenix.Princeton.EDU (Kartik Subbarao) says: > > [ Removing information about PKUnzip and Norton QU] > Might I suggest a program called DZip? This program will compare the files in a subdirectory against a .Zip file and remove the files that match from the Sub-Dir. Then you won't have to QU a file (a program that has been replaced in the newer version of Norton) E-Mail me for a copy if you want it. Carl Schelin tcs@mailer.jhuapl.edu
cgordon@vpnet.chi.il.us (Crash Gordon) (12/08/90)
>Author: [Kartik Subbarao] >The general way I used to create ZIP files >of everything in a directory was to do this: >pkzip zipfile *.* >del *.* >qu zipfile.zip # i.e unerase the just created ZIP file This should work, but there is a _much_ simpler way! Use this: PKZIP -M zipfile *.* Using the -M option tells PKZIP to Move the files. PKZIP will compress the files into the zipfile, then delete the source files, leaving only the zipfile in the directory. ----------------------------------------------------- Gordon S. Hlavenka cgordon@vpnet.chi.il.us Disclaimer: Yeah, I said it. So what?
system@infopls.UUCP (SYSOP) (12/09/90)
subbarao@phoenix.Princeton.EDU (Kartik Subbarao) writes: > Something went fishy the other day when it appeared that all of my .ZIP > files were corrupted for some unknown reason. The reason is kind of odd, > and thats why I'm asking why. The general way I used to create ZIP files > of everything in a directory was to do this: > > pkzip zipfile *.* > del *.* > qu zipfile.zip # i.e unerase the just created ZIP file > > however, it appears that deleting and undeleting a zip file somehow changes > it because afterwards when I do a pkunzip -t (or whatever the flag is that > verifies the stuff) pkzip finds problems that pkzipfix can't even fix. > The real culprit is that a newly created .ZIP file tends to be badly fragmented. That's due to the temporary files created in the process. When you delete everything, QU only knows where the FIRST cluster was. It has to guess from then on. There is one easy way to fix it. BEFORE deleting your files, but after creating the .ZIP, type IMAGE (Norton 5) or FR /SAVE (Norton 4.5). QU will use the copy of the FAT created to help recover your file. Also, as someone else mentioned, there is a -m option that will delete all files put into the .ZIP after it is successfully created. If you are running 4DOS, you could also use EXCEPT (*.ZIP) del *.* Generically, you could also try ATTRIB +H *.ZIP before deleting. --------------- Andrew Rossmann andyross@infopls.UUCP or ..!uunet!ddsw1!infopls!system Infoplus Support BBS +1 708 537 0247, 1200/2400, 24 hours
stephenc@cunixf.cc.columbia.edu (Stephen Chung) (12/10/90)
subbarao@phoenix.Princeton.EDU (Kartik Subbarao) writes: > Something went fishy the other day when it appeared that all of my .ZIP > files were corrupted for some unknown reason. The reason is kind of odd, > and thats why I'm asking why. The general way I used to create ZIP files > of everything in a directory was to do this: > > pkzip zipfile *.* > del *.* > qu zipfile.zip # i.e unerase the just created ZIP file > The best way I know is to get a copy of mv.exe, which moves a file to another directory. If you can't get a copy, check in simtel20 or send me mail and I'll send you a copy. This method requires the least key-strokes: pkzip whatever <== You don't need the *.*, it is assumed mv whatever \ <== Most of the time you want the zip file in another directory (e.g. \archive) anyway... del *.* - Stephen
silver@xrtll.uucp (Hi Ho Silver) (12/10/90)
In article <4512@idunno.Princeton.EDU> subbarao@phoenix.Princeton.EDU (Kartik Subbarao) writes:
$[...]The general way I used to create ZIP files
$of everything in a directory was to do this:
$pkzip zipfile *.*
$del *.*
$qu zipfile.zip # i.e unerase the just created ZIP file
I'm unaware of any bugs in qu that would cause this; however, there is
a bug in your method of moving files into a ZIP. Why not just use the move
option rather than add? It adds the files to the archive just like the
implied add above does, and then it deletes the source files if the
add operation was successful. Try:
pkzip -m zipfile *.*
--
__ __ _ | ...!nexus.yorku.edu!xrtll!silver | always
(__ | | | | |_ |_) >----------------------------------< searching
__) | |_ \/ |__ | \ | if you don't like my posts, type | for
_____________________/ find / -print|xargs cat|compress | SNTF
silver@xrtll.uucp (Hi Ho Silver) (12/10/90)
In article <76686@iuvax.cs.indiana.edu> bobmon@iuvax.cs.indiana.edu (RAMontante) writes:
$it's easier, simpler, and faster than your three-step procedure.
^^^^^^
Not always ... PKZip will individually delete files when it's done,
whereas DEL *.* will delete all the files at once. For a large number
of files, particularly in a subdirectory, PKZip could be far slower at
deleting the files. A minor technicality ... :-)
--
__ __ _ | ...!nexus.yorku.edu!xrtll!silver | always
(__ | | | | |_ |_) >----------------------------------< searching
__) | |_ \/ |__ | \ | if you don't like my posts, type | for
_____________________/ find / -print|xargs cat|compress | SNTF
jm9t+@andrew.cmu.edu (Josh Brian Mastronarde) (12/10/90)
I'd just like to put my 2 cents in on this. Unerasing files on a regular basis is a dangerous idea, if you care about the files you are Zipping. Unless you hard disk is completely unfragmented (very unlikely) all the time, chances are the zip file will NOT be intact. It might work if you only deleted the one .zip file and then tried to recover it (as when you accidentally delete a file, which is what Unerasing was meant for), but when you delete all the other files in the directory too, DOS doesn't keep track of which unused cluster came from which erased file. Unerasing programs take their best guess (usually trying the next sequential free clusters), and if there was any fragmentation at all, the newly freed clusters are not in order by file. So you will almost always get pieces of the .zip file mixed with the other files you deleted. The best solutions: either use the -m option of PKZIP, copy the .zip file to another directory before deleting all the files, or you could try using ATTRIB to hide the file first. But I guarantee you if you keep trying to unerase the .zip file, you will lose your data almost all of the time. Hope this helps, \\\ Josh Mastronarde /// \\\ jm9t+@andrew.cmu.edu ///
johnlee@pnet01.cts.com (John Wiley) (12/10/90)
stephenc@cunixf.cc.columbia.edu (Stephen Chung) writes: >subbarao@phoenix.Princeton.EDU (Kartik Subbarao) writes: > >pkzip whatever <== You don't need the *.*, it is assumed >mv whatever \ <== Most of the time you want the zip file > in another directory (e.g. \archive) > anyway... >del *.* ^ You don't need the *.*, since . (current directory) will do. In fact, you don't even need a space before the dot. Try: DEL. In the "consistently inconsistent" manner of MS-DOS, it works great for DEL even tho DIR won't take it. :-/ UUCP: {hplabs!hp-sdd, sdcsvax, nosc}!crash!pnet01!johnlee ARPA: crash!pnet01!johnlee@nosc.mil (John Wiley - San Diego, CA.) INET: johnlee@pnet01.CTS.COM
peter@cunixf.cc.columbia.edu (Peter Wu) (12/11/90)
In article <1990Dec9.224851.23130@cunixf.cc.columbia.edu> stephenc@cunixf.cc.columbia.edu (Stephen Chung) writes: >subbarao@phoenix.Princeton.EDU (Kartik Subbarao) writes: > >> The general way I used to create ZIP files >> of everything in a directory was to do this: >> >> pkzip zipfile *.* >> del *.* >> qu zipfile.zip # i.e unerase the just created ZIP file >> >pkzip whatever <== You don't need the *.*, it is assumed >mv whatever \ <== Most of the time you want the zip file > in another directory (e.g. \archive) > anyway... >del *.* I think what you guys really want here is to do: pkzip -m zipfile *.* The "-m" option will delete the files that it archives after they are archived and so you don't have to do anything else .. -- Pedro Quien? peter@cunixf.cc.columbia.edu Peter K. Wu
robert@ireq.hydro.qc.ca (R.Meunier 8516) (12/13/90)
In article <1990Dec9.224851.23130@cunixf.cc.columbia.edu> stephenc@cunixf.cc.columbia.edu (Stephen Chung) writes: >subbarao@phoenix.Princeton.EDU (Kartik Subbarao) writes: > >> pkzip zipfile *.* >> del *.* >> qu zipfile.zip # i.e unerase the just created ZIP file >> > >The best way I know is to get a copy of mv.exe, which moves a >file to another directory. If you can't get a copy, check in >simtel20 or send me mail and I'll send you a copy. This method >requires the least key-strokes: > Or use the 'no' command of pcmagazine utilities or 'except' command of 4DOS like this no *.zip del *.* except (*.zip) del *.* -- ----------------------------------------------------------------------- Robert Meunier Institut de Recherche d'Hydro-Quebec Ingenieur 1800 Montee Ste-Julie, Varennes Internet: robert@ireq.hydro.qc.ca Qc, Canada, J3X 1S1
mir@opera.chorus.fr (Adam Mirowski) (12/14/90)
In article <6231@crash.cts.com>, johnlee@pnet01.cts.com (John Wiley) writes: %% stephenc@cunixf.cc.columbia.edu (Stephen Chung) writes: %% >subbarao@phoenix.Princeton.EDU (Kartik Subbarao) writes: %% > %% >pkzip whatever <== You don't need the *.*, it is assumed %% >mv whatever \ <== Most of the time you want the zip file %% > in another directory (e.g. \archive) %% > anyway... %% >del *.* %% ^ You don't need the *.*, since . (current directory) will do. %% In fact, you don't even need a space before the dot. Try: DEL. %% In the "consistently inconsistent" manner of MS-DOS, it works great for DEL %% even tho DIR won't take it. :-/ In fact, you should make "mv whatever.zip \" if "whatever" doesn't contain an extension already. -- Adam Mirowski, mir@chorus.fr (FRANCE), tel. +33 (1) 30-64-82-00 or 74 Chorus systemes, 6, av.Gustave Eiffel, 78182 Saint-Quentin-en-Yvelines CEDEX
cgordon@vpnet.chi.il.us (Crash Gordon) (12/17/90)
Just to throw yet another suggestion into this mess: Some have indicated that it may be faster to do "DEL *.*" (or "DEL.", if you must) than to use PKZIP's "-m" option. Certainly the safest way to avoid the "-m" would be to do this: PKZIP -a <zipfile> *.* ATTRIB +r <zipfile>.ZIP /* or you can use Norton's FA */ DEL *.* /* <zipfile> will not be deleted */ ATTRIB -r <zipfile>.ZIP That way you don't have to use QU. This is probably the slowest solution, though. (For those of you to whom each millisecond is vital :-P ) I still think "-m" is the method of choice. ----------------------------------------------------- Gordon S. Hlavenka cgordon@vpnet.chi.il.us Disclaimer: Yeah, I said it. So what?