title: How to compare two directories using diff while ignoring non-existing files?
body: <p>I would like to use <code>diff</code> to compare two directories for differing files, using the <code>-q</code> option for brief output. However, the output is cluttered with a lot of files that only exist in one directory, but not the other. Can I force <code>diff</code> (or use another tool) to only show files that differ AND exist in both directories?</p>
  
  <p>The current command I use is</p>
  
  <pre><code>diff -q &lt;dir1&gt; &lt;dir2&gt;
  </code></pre>
  
  <p>Any ideas are appreciated.</p>