March 26, 2014 0

finding text in files using find in linux

By in linux, ubuntu

Based on this stack-overflow response: http://stackoverflow.com/questions/16956810/finding-all-files-containing-a-text-string-in-linux
one way of searching for files containing a certain text patterns is:
grep -rnw ‘directory’ -e “pattern”

if you want to search relative to your current position replace “directory” with a . so:
grep -rnw . -e “pattern”

Tags:


Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/mgis.dk/about/wp-includes/class-wp-comment-query.php on line 399

Leave a Reply