Hi, I need to unzip a file that a directory may have, and I want to exclude everything from this directory, I tried many options and looked here, but did not seem to find a good solution.
This is the contents of the zip file: Note that the depth of the EXCLUDE folder is unknown, but we must exclude all
$unzip -l patch2.zip Archive: patch2.zip Length Date Time Name --------- ---------- ----- ---- 0 2013-10-29 17:42 EXCLUDE/ 0 2013-10-29 17:24 EXCLUDE/inner/ 0 2013-10-29 17:24 EXCLUDE/inner/inner1.txt 0 2013-10-29 15:45 EXCLUDE/file.txt 0 2013-10-29 15:44 patch.jar 0 2013-10-29 15:44 system.properties --------- ------- 0 6 files
I tried this command, which extracts only the files inside it, but not the folder and its contents:
$unzip -l patch2.zip -x EXCLUDE/* Archive: patch2.zip Length Date Time Name --------- ---------- ----- ---- 0 2013-10-29 17:42 EXCLUDE/ 0 2013-10-29 17:24 EXCLUDE/inner/ 0 2013-10-29 17:24 EXCLUDE/inner/inner1.txt 0 2013-10-29 15:44 patch.jar 0 2013-10-29 15:44 system.properties --------- ------- 0 5 files
Thanks for the help.
source share