title: Combining find command conditions
body: <p>I am trying to combine 2 find commands to pipe to a grep pattern match.</p>
  
  <p>my 3 commands are:</p>
  
  <p><strong>get files modified in the last 24 hours:</strong></p>
  
  <pre><code>find '/logs' -mtime 0 -type f
  </code></pre>
  
  <p><strong>ignore a couple of directories:</strong></p>
  
  <pre><code>find -type d \( -path /dir -o -path /dir2 -o -path /dir3 \) -prune -o -print
  </code></pre>
  
  <p><strong>find pattern in the file's lines:</strong></p>
  
  <pre><code>grep -rnw -e "my pattern"
  </code></pre>
  
  <p>I have gotten below to work but cant seem to add directory skipping into the mix.</p>
  
  <p><strong>get files modified in the last 24 hours and find pattern in the file's lines:</strong></p>
  
  <pre><code>find '/logs' -mtime 0 -type f | xargs grep -rnwI -e "my pattern"
  </code></pre>
  
  <p>So ideally I would like to combine getting files modified in the last 24 hours and ignoring directories.</p>