192
23
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?
1e.g:
unzip -o ZIP_PATH
, works as a modifier. – bonzofenix – 2014-07-21T22:35:33.41311
-o
option should be used before any other arguments. Example:unzip -o /path/to/archive.zip -d /destination_dir
– FelikZ – 2015-05-28T08:48:40.7301@FelikZ Thanks for the detail, I added your (stripped down) example to the answer – foraidt – 2015-05-28T11:57:05.747
this does not work on Azure web sites (Windows). – loretoparisi – 2016-08-25T14:28:06.063
@loretoparisi What are you talking about? This is a Linux question. Are you looking for something like Expand-Archive?
– Franklin Yu – 2018-01-09T14:46:00.890its showing
inflating: foldername/filename.php
@foraidt – SagarPPanchal – 2019-02-26T11:03:21.367