Search for keyword in files inside of directory

/ Published in: Bash
Save to your folder(s)

Fast and easy way to find a keyword inside of files located inside of a directory tree. (eg: looking for a function foo, inside of your applications directory.) This command will display a list of files which contain function foo.

Copy this code and paste it in your HTML
  1. find . -name “filenames” -exec grep -i -H -n ‘texttofind’ {} \;


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.