grepping a database [message #97498] |
Fri, 28 June 2002 02:30 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
chriswhittaker
Messages: 2 Registered: May 2002
|
Junior Member |
|
|
I am trying to locate all files that contain a certain string. I am sure i should be using grep, but how do i arrange it to look through all files within a directory for this string.
i.e. i am trying to serach for locate all files with the word cookiemonster in them so that i can remove this string from the files
|
|
|
Re: grepping a database [message #97500 is a reply to message #97498] |
Fri, 28 June 2002 06:07 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
dennis
Messages: 31 Registered: June 1998
|
Member |
|
|
Try this...to find all text filenames that have the string "cookiemonster" in it, working recursively from the directory called 'mydir':
find mydir -type f -exec grep -il cookiemonster {} ;
Dennis
|
|
|
Re: grepping a database [message #97502 is a reply to message #97498] |
Fri, 28 June 2002 12:58 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
If you have binary files, you could try prepping them for grep by using "strings". Not sure of the total command including find though...
strings my_bin_file | grep blah
|
|
|