Search a string in a folder [message #98222] |
Fri, 14 May 2004 02:39 |
Ravi
Messages: 251 Registered: June 1998
|
Senior Member |
|
|
I am using SunOS 5.6
I want to search all files in side a folder containg a particular
string/text. folder may contain subfolders. I used grep but grep command gives only files in the current directory, It does not searches insde the subfolders.
Thanks
|
|
|
Re: Search a string in a folder [message #98232 is a reply to message #98222] |
Thu, 20 May 2004 05:05 |
Frank Naude
Messages: 4581 Registered: April 1998
|
Senior Member |
|
|
Hi,
One can combine find and grep to search for a particular string within a directory, including the subdirectories.
Example:
find . -name *.log -exec grep -il oracle {} ;
Best regards.
Frank
|
|
|
|
|
|