Bash find and grep search results

Use the find command to locate certain files and grep to search for strings within the files found.

Find todo tasks in recently modified files:

$ find . -mmin -$((60*24)) -exec grep --color --with-filename "TODO" {} \;
Did this help you? Please let me know with a comment. Thank you
Posted .

Comments (RSS)

Leave a comment