title: How to exclude a specific file in find
body: <p>Suppose my directory structure looks like</p>
  
  <pre><code>A--file1.cpp
     file2.cpp
     file3.cpp
     file1.h
     file2.h
     file3.h
  
  B--file1.cpp
     file2.cpp
     file3.cpp
     file1.h
     file2.h
     file3.h
  </code></pre>
  
  <p>and my goal is to find every cpp file besides <code>file1.cpp</code> in the A folder</p>
  
  <p><code>find A/ B/ -name \*.cpp</code> will find all the files, and I tried <code>find A/ B/ ! -name file1.cpp -name \*.cpp</code> this will exclude <code>file1.cpp</code> from the B folder as well. <code>find A/ B/ -prune -o file1.cpp -name \*.cpp</code> doesn't work either. What is the correct way to do it?</p>