title: linux unzip excluding everything in the folder and underneath
body: <p>Hi I have to unzip a file that could have a Directory and I want to exclude everything within that directory, I tried lot of options and looked here as well, but doesn't seem to find any good solution.</p>
  
  <p>These are the contents of the zip file: 
  Please note the depth of EXCLUDE folder is unknown, but we have to exclude everything</p>
  
  <pre><code>    $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
  </code></pre>
  
  <p>I tried this command, which only extract the files within it, but not the folder and its contents:</p>
  
  <pre><code>$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
  </code></pre>
  
  <p>Thanks for the help.</p>