Find UNIX files in the past day that contains a keyword

Trying to find a file that was modified in the past day that contains a certain keyword…

Here’s the trick:

find -type f -name “<filename search string>” -mtime -1 -exec grep -l “<keyword>” {} \;

Where filename search string is any help you can give it to filter down the file type, such as *.txt or s* and keyword is the phrase you are searching for.

mtime -1 could be modified to be any time frame, such as the past week (mtime -7).