Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 27
    Look at the next answer. Do not use this one. Commented Jun 24, 2013 at 14:42
  • Which problem do you see with this one? Commented Jun 25, 2013 at 16:17
  • 3
    it is complex and inefficient. The built-in grep tool is able to solve the question with a single flag. This answer may do the job, but it is a poor solution, in light of the other one's existence. Wouldn't you agree? Commented Jun 25, 2013 at 19:15
  • 2
    It depends much on the number of files to search and their size. Often it isn't of interest if a search runs for 0.01s or 0.001s. Still, kevs answer is much faster to type, more easy to remember and even if you don't remember any of them more easy to look up. However, I guess my command shows how to chain filters with find which is a useful thing to see, so I don't like to delete it, even While I upvoted kevs solution. Commented Jun 25, 2013 at 22:48
  • 10
    Not all versions of grep support -I Commented Sep 13, 2013 at 18:39