Linux: How to ‘find’ and search ONLY text files?

The ‘find’ command in Linux systems searches through a directory and return files that┬ásatisfy┬ácertain criteria. For instance, to find a file that contains the string ‘needle text’ in the ‘mydocs’ directory: find mydocs -type f -exec grep -l “needle text” {} \; The problem of this approach is that it would search through ALL files …

Linux: How to ‘find’ and search ONLY text files? Read More »