title: Compare two version of zip file and find which file has been modified within that zip
body: <p>I have two zip files called 10.88.10 and 10.88.12. One or more files in 10.88.12 have been modified. Is there any way I can find out which file has been modified?</p>
  <p>The zip file contains a directory, a subdirectory, and zip files inside.</p>
  <p>Code I've tried (I don't think I am on right path):</p>
  <pre><code>m1= md5sum 10.88.10.zip | cut -d' ' -f1
  m2=  md5sum 10.88.12.zip | cut -d' ' -f1
  
   if [ &quot;m1&quot; != &quot;m2&quot; ]; then
                  echo file are not same
  
  
  cd &quot;/c/Users/name/Downloads/10.88.10/&quot;
  
  while [ &quot;`find . -type f -name '*.zip' | wc -l`&quot; -gt 0 ]
  do
  
          cd &quot;/c/Users/name/Downloads/10.88.10/&quot;
          find . -type f -name &quot;*.zip&quot; -exec unzip -- '{}' \; -exec rm -- '{}' \;
  done
  
  cd &quot;/c/Users/name/Downloads/10.88.12/&quot;
  
  
          while [ &quot;`find . -type f -name '*.zip' | wc -l`&quot; -gt 0 ]
          do
                  find . -type f -name &quot;*.zip&quot; -exec unzip -- '{}' \; -exec rm -- '{}' \;
          done
  
  cd &quot;/c/Users/name/Downloads/&quot;
          find 10.88.10/* -type f -print0 | xargs -0 sha1sum |cut -d' ' -f1 &gt; file1.txt
          find 10.88.12/* -type f -print0 | xargs -0 sha1sum | cut -d' ' -f1 &gt; file2.txt
         diff file1.txt file2.txt
  
  
  else
          echo false
  fi
  </code></pre>
  <p>I tried hash to find out modified file by comparing and getting unique values but unfortunately I only receive the hash and can't think of a way to get names of the the input file which corresponds to that hash.</p>
  <p>Running the hash cmd:</p>
  <pre><code>find 10.88.10/* -type f -print0 | xargs -0 sha1sum
  </code></pre>
  <p>Output:</p>
  <pre><code>c3f2b563b3cb091e2adsss321221a3d *10.88.12/name.xml
  </code></pre>
  <p>Difference/Modified file in hash:</p>
  <pre><code>1c1
  &lt; 3c2a991d1231c3eae391fadsdadda19e8f7b85df8caf2d
  ---
  &gt; c3f2b56qwdq2112e375b40fbfd5e60f526da3d1874c1874
  &lt; fbdc82dasdaa30538e5adadadada2d9456ff86953fbeeb1
  ---
  &gt; f962e8eqeqeqqe3b65d3ed43559adc879f5600c738e1e1c
  </code></pre>
  <p>Required output:</p>
  <pre><code> &lt; 10.88.10/FOLDER/FILE1.XML 
  ---
  &gt; 10.88.12/FOLDER1/FILE1.XML
  &lt; 10.88.10/FOLDER/FILE2.TXT
  ---
  &gt; 10.88.12/FOLDER/FILE2.TXT
  </code></pre>
  <p>IF anyone has a Java solution or bash script please share it.</p>