Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

What happens if you interrupt following command

$ zip -erm foo foo/dirfoo1

I realized that time will not permit me to finish. What happens when I Ctrl+C me out of this? Am I left with something that could be continued where it left off? If so, would that be as simple as re-running the command?
Or am I going to find what is not unzipped, and can I run the command for the "leftovers"?

share|improve this question
    
why don't you try experimenting with it, and then post your results as your answer. –  gosmond Feb 22 '13 at 13:10
    
that's exactly what I tried, 2min into the posting of my Q, but I had not enough "karma" to answer my own within such a short time interval ... zip process is volatile - i.e. crtl/c removes everything created temporarily. –  netfortius Feb 22 '13 at 14:12
    
^Z should work though –  Josh Feb 22 '13 at 16:18
add comment

1 Answer 1

Am I left with something that could be continued where it left off

No. If you send a an Interrupt Unix Signal to zip using Control-C, you'll terminate the zip process and when you run it again it will start from the beginning, overwriting anything it already extracted.

If you instead send a Stop signal Control-Z, the zip process will be paused, and you can resume it later using the fg command.

Note that this will only work if you can maintain the state of your system. That is, if you sleep the system you'll be OK, but if you shutdown, then zip will still be killed. Also, it assumes that the file zip was working with remains available while it is stopped; that is, if it resides ona network share which you dismount, sending a SIGSTOP will still not work.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.