List files containing a specific string in *NIX OS


Whether you’re using Unix, Linux, or macOS (excuse me Windows) - it’s never easier to find files containing a specific set of words or even just a single unique word you’re trying to look for.

You can easily do it in the “command line” using a terminal. Similar to the one below.


find . -type f -exec grep -l “The String You Want To Find” -i {} \;

Run the above command inside the directory you want to search the files. That’s it! Easy right?

It takes time depending on the number of files you have inside the directory.

As always, learn something every day!