grep --include='FILEPATTERN' -rin SEARCHPATTERN * Where: FILEPATTERN is the file name pattern you want to match, for example 'h*' for all files that start with h -r is recursive i is ignore case for SEARCHPATTERN matching n is print out the line number SEARCHPATTERN is what you want to search * is to include all files (which is usually what you use if you use --include)