Find files that contain some text

A short one liner to find all files in a directory tree that contain some text.

grep -Rl “text to searchdirectory

The text to search may be a regular expression as accepted by grep. The directory is the root of the tree you want to search.

Hope this is found helpful.

Leave a Comment