Find By Contents

This will recursively search all the files, with a certain filename pattern (in this case *.h) in a certain directory, that contains a certain text pattern in its contents (in this case ‘DeviceDriver’).

find . -name '*.h' -print0 
| xargs -0 grep -n -e DeviceDriver

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.