Unzip Running on Linux using -d and overwrite together
Asked Answered
A

2

5

i am trying to use unzip in order to pull files , extract them on a local server and upload to S3.

my sctipt get stuck due to overwrite flag :

eplace /home/folder1/tmp/creative_tmp/5a558e1d4337410887ffde9c8aeff90b_Burger_250x350.jpg? [y]es, [n]o, [A]ll, [N]one, [r]ename:

i run the following command at the server :

unzip -d /home/folder1/tmp/creative_tmp/large_image_file.zip

now i need to add -o to the unzip command like so :

unzip -o /path/to/archive.zip

But i also need to run the -d option for unzipping the Zip file at the right location.

i tried some combinations and i didn't get it to work. i will appreciate your help with this . Thanks

Alrick answered 31/8, 2016 at 0:14 Comment(0)
A
9

This should work:

unzip -o -d /path/to/folder /path/to/archive.zip
Athodyd answered 31/8, 2016 at 0:19 Comment(0)
B
3

This should work:

unzip -o /path/of/zipfile.zip -d /path/to/unzip/
Bravo answered 6/6, 2022 at 13:33 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Honshu

© 2022 - 2024 — McMap. All rights reserved.