Posted By

luizlopes on 12/15/11


Tagged

search grep ubuntu keyword find locate


Versions (?)

Search for keyword in files inside of directory


 / Published in: Bash
 

URL: http://www.howtogeek.com/howto/ubuntu/find-files-containing-search-terms-on-ubuntu/

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.

  1. find . -name “filenames” -exec grep -i -H -n ‘texttofind’ {} \;

Report this snippet  

You need to login to post a comment.