[Using Terminal on Mac/Sonoma] I zip my working directory with zip -u archive dir when ending a work session. dir is located on an external USB drive, archive on another external USB drive. I accidentally deleted myfile in the working dir and tried to restore it.
The file was zipped twice: on Jan 7 and a modified version on Feb 24. Every attempt to unzip the Feb 24 version retrieved the Jan 7 version instead. I verified that both versions are present in archive with unzip -l archive.
Attempts that failed:
unzip archive myfile
unzip -n archive myfile and unzip -u archive myfile: would it extract Jan 7 and then overwrite with Feb 24--NO
Could I somehow limit the timestamp? NO: info unzip did not reveal any option that would do this.
Before you ask, Yes, Time Machine was Plan A. Being VERY paranoid, however I always TM AND zip my work. For unknown reasons not relevant to this query, the second drive was not backed up, so on to Plan B (zip). Plan C is to recreate as much as I can of myfile (90% if I'm lucky and two days' work), but obviously I would really, really like to make Plan B work. Thanks in advance if you can help.