title: How can I get `find` to ignore .svn directories?
body: <p>I often use the <code>find</code> command to search through source code, delete files, whatever. Annoyingly, because Subversion stores duplicates of each file in its <code>.svn/text-base/</code> directories my simple searches end up getting lots of duplicate results. For example, I want to recursively search for <code>uint</code> in multiple <code>messages.h</code> and <code>messages.cpp</code> files:</p>
  
  <pre><code># find -name 'messages.*' -exec grep -Iw uint {} +
  ./messages.cpp:            Log::verbose &lt;&lt; "Discarding out of date message: id " &lt;&lt; uint(olderMessage.id)
  ./messages.cpp:    Log::verbose &lt;&lt; "Added to send queue: " &lt;&lt; *message &lt;&lt; ": id " &lt;&lt; uint(preparedMessage-&gt;id)
  ./messages.cpp:                Log::error &lt;&lt; "Received message with invalid SHA-1 hash: id " &lt;&lt; uint(incomingMessage.id)
  ./messages.cpp:            Log::verbose &lt;&lt; "Received " &lt;&lt; *message &lt;&lt; ": id " &lt;&lt; uint(incomingMessage.id)
  ./messages.cpp:            Log::verbose &lt;&lt; "Sent message: id " &lt;&lt; uint(preparedMessage-&gt;id)
  ./messages.cpp:        Log::verbose &lt;&lt; "Discarding unsent message: id " &lt;&lt; uint(preparedMessage-&gt;id)
  ./messages.cpp:        for (uint i = 0; i &lt; 10 &amp;&amp; !_stopThreads; ++i) {
  ./.svn/text-base/messages.cpp.svn-base:            Log::verbose &lt;&lt; "Discarding out of date message: id " &lt;&lt; uint(olderMessage.id)
  ./.svn/text-base/messages.cpp.svn-base:    Log::verbose &lt;&lt; "Added to send queue: " &lt;&lt; *message &lt;&lt; ": id " &lt;&lt; uint(preparedMessage-&gt;id)
  ./.svn/text-base/messages.cpp.svn-base:                Log::error &lt;&lt; "Received message with invalid SHA-1 hash: id " &lt;&lt; uint(incomingMessage.id)
  ./.svn/text-base/messages.cpp.svn-base:            Log::verbose &lt;&lt; "Received " &lt;&lt; *message &lt;&lt; ": id " &lt;&lt; uint(incomingMessage.id)
  ./.svn/text-base/messages.cpp.svn-base:            Log::verbose &lt;&lt; "Sent message: id " &lt;&lt; uint(preparedMessage-&gt;id)
  ./.svn/text-base/messages.cpp.svn-base:        Log::verbose &lt;&lt; "Discarding unsent message: id " &lt;&lt; uint(preparedMessage-&gt;id)
  ./.svn/text-base/messages.cpp.svn-base:        for (uint i = 0; i &lt; 10 &amp;&amp; !_stopThreads; ++i) {
  ./virus/messages.cpp:void VsMessageProcessor::_progress(const string &amp;fileName, uint scanCount)
  ./virus/messages.cpp:ProgressMessage::ProgressMessage(const string &amp;fileName, uint scanCount)
  ./virus/messages.h:    void _progress(const std::string &amp;fileName, uint scanCount);
  ./virus/messages.h:    ProgressMessage(const std::string &amp;fileName, uint scanCount);
  ./virus/messages.h:    uint        _scanCount;
  ./virus/.svn/text-base/messages.cpp.svn-base:void VsMessageProcessor::_progress(const string &amp;fileName, uint scanCount)
  ./virus/.svn/text-base/messages.cpp.svn-base:ProgressMessage::ProgressMessage(const string &amp;fileName, uint scanCount)
  ./virus/.svn/text-base/messages.h.svn-base:    void _progress(const std::string &amp;fileName, uint scanCount);
  ./virus/.svn/text-base/messages.h.svn-base:    ProgressMessage(const std::string &amp;fileName, uint scanCount);
  ./virus/.svn/text-base/messages.h.svn-base:    uint        _scanCount;
  </code></pre>
  
  <p>How can I tell <code>find</code> to ignore the <code>.svn</code> directories?</p>
  
  <hr>
  
  <p><strong>Update</strong>: If you upgrade  your SVN client to <a href="http://subversion.apache.org/docs/release-notes/1.7.html#single-db" rel="noreferrer">version 1.7</a> this is no longer an issue.</p>
  
  <blockquote>
    <p>A key feature of the changes introduced in Subversion 1.7 is the centralization of working copy metadata storage into a single location. Instead of a <code>.svn</code> directory in every directory in the working copy, Subversion 1.7 working copies have just one <code>.svn</code> directory—in the root of the working copy. This directory includes (among other things) an SQLite-backed database which contains all of the metadata Subversion needs for that working copy.</p>
  </blockquote>