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.

Required fields*

7
  • 1
    Thanks for this solution! For some reason file displays English text rather than ASCII text on my Solaris system, so I modified that portion accordingly. Also, I replaced awk -F: '{print $1}' with the equivalent cut -f1 -d:. Commented Dec 10, 2013 at 18:12
  • 4
    worth saying grep -I filters binaries Commented Aug 10, 2016 at 17:31
  • Looking for the word text should be sufficient. This will also pick up file descriptions like ASCII Java program text or HTML document text or troff or preprocessor input text. Commented Nov 1, 2016 at 23:02
  • My answer is partially a response/improvement upon this answer. Very good point about grepping for ASCII text to avoid messing up RTFs. Commented Nov 5, 2016 at 16:03
  • 1
    xenoterracide: You saved my life man ! Just a flag -I and BINGO Commented Jan 4, 2017 at 21:38