Aug
11

Find By Contents

By

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
Categories : Linux, Notes

Leave a Comment

You must be logged in to post a comment.