title: Hadoop - search particular strings then returned filename that containt the strings
body: <p>In hadoop hdfs, how to write a command that list down all the files that contain string 'SFD'</p>
  
  <p>To search string, here the command, and I can get the results, but I want to know which files contain this string 'SFD' and I've thousand files in test directory.</p>
  
  <pre><code>hadoop fs -cat /test/*.txt | grep SFD
  </code></pre>