Monday, January 3, 2011

Find out a file which contains specific string

To find out a file which contains specific string, execute the following command from shell


# find /var/www/html/mysite-iname '*php' | xargs grep 'about' -s1

Here, searchesfor file which contains string 'about' .