title: unix command line ...how to grep and show only file names that contain a string?
body: <p>I know I can search for a string with:</p>
  
  <pre><code>grep -n -d recurse 'snoopy' *
  </code></pre>
  
  <p>and then it shows every file name and instance that contains that string, like:</p>
  
  <pre><code>file/name.txt:23    some snoopy here
  file/name2.txt:59   another snoopy there
  file/name2.txt:343  some more snoopy
  etc...
  </code></pre>
  
  <p>The problem is that with many occurrences, the list is huge. How do I make it show only the actual file names that contain the string, without duplicates and without the occurrence?</p>
  
  <p>Only like:</p>
  
  <pre><code>file/name1.txt
  file/name52.txt
  file/name28293.txt
  </code></pre>
  
  <p>Thanks a lot for any help :)</p>