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

This is unacceptable for a script.
I need an option to force unzip to overwrite the files.
I did not find in the man page nor with Google.

link|improve this question

71% accept rate
feedback

1 Answer

up vote 2 down vote accepted

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

link|improve this answer
Indeed! Thanks a lot! – Nicolas Raoul Jan 26 '10 at 10:36
feedback

Your Answer

 
or
required, but never shown

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