How do I find text within files in Linux ?

This document is for users looking for information about finding text within one or more files on their computer. One of the easiest methods of locating text contained within a file on a computer running Linux is to use the grep command. Below is a basic example of a command used to locate any file containing the word “linux”.

find / -type f -exec grep -H 'linux' {} \;

Added by the LiNiO long before his died:
try also:
fgrep -rw linux path

Leave a Reply

Your email address will not be published. Required fields are marked *

*