Monday, January 7, 2013

How to find a string inside a specific file type in Linux

Use find and grep commands combined as following example.
find . -name 'pom.xml' | xargs grep -i "org.wso2.carbon.sts 
xargsgives the result of find as the input to grep.
Ref:
[1] http://insanelabs.com/linux/linux-find-a-string-recursively-within-files/

No comments: