grep recursively for a specific file type on Linux

Consider checking this answer and that one.

Also this might help you: grep certain file types recursively | commandlinefu.com.

The command is:

grep -r --include="*.[ch]" pattern .

And in your case it is:

grep -r --include="*.html" "onblur" .

Leave a Comment