Monday, March 9, 2015

How can I use grep to find a word inside a folder?

grep -nr yourString* .
The dot at the end searches the current directory, and -r searches sub-directories.
grep -nr MobileAppSer* . (Will search for MobileAppServlet.java or .class or .txtMobileAppASer*.* is another way to do the same thing.)

No comments: