0

I have a file named 'mainZip.zip''

This file ('mainZip.zip'') contains two files:

'textFile.txt'

'secondaryZip.zip'


'secondaryZip.zip' file contains two files as well:

'apple.bin'

'cat.jpg'


Can you advise how to unzip 'cat.jpg' in one bash command? can this be done using 'unzip' only?

user3262424
  • 7,223
  • 16
  • 54
  • 84

2 Answers2

0

This works:

unzip mainZip.zip && unzip secondaryZip.zip
Keith
  • 42,110
  • 11
  • 57
  • 76
  • True, but the example doesn't really indicate recursive. Truly recursive will require some more elaborate script. – Keith Feb 17 '11 at 07:58
  • Keith: thank you, yet this solution unzips both files, while I was interested to unzip just `'cat.jpg'` from file `'secondaryZip.zip'` – user3262424 Feb 17 '11 at 15:42
-1

Here is someone's answer to this exact question, using a custom script. It appears that Unix does not have a built-in recursive unzip option

Ken Wayne VanderLinde
  • 18,915
  • 3
  • 47
  • 72