Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am writing a shell script that unzips a ZIP file into an existing hierarchy of files, potentially overwriting some of the files.

The problem is that the unzip command asks for confirmation:
replace jsp/extension/add-aspect.jsp? [y]es, [n]o, [A]ll, [N]one, [r]ename: y

Is there an option to force unzip to overwrite the files?

share|improve this question

1 Answer 1

up vote 30 down vote accepted

According to http://www.manpagez.com/man/1/unzip/ you can use the -o option to overwrite files.

share|improve this answer
    
Indeed! Thanks a lot! –  Nicolas Raoul Jan 26 '10 at 10:36
    
e.g: unzip -o ZIP_PATH, works as a modifier. –  bonzofenix Jul 21 at 22:35

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.