1824976 Members
3650 Online
109678 Solutions
New Discussion юеВ

help with grep

 
SOLVED
Go to solution
Clint Wilson_1
New Member

help with grep

i am not sure if its possible, but i want to use grep to search for a particular string in all files in a certain directory. for example, i need to find out which files in the /code directory contain the string "seriSC"
is this possible?
thanks!
3 REPLIES 3
Christopher McCray_1
Honored Contributor
Solution

Re: help with grep

#grep "seriSC" /code/*

be careful there are no binaries in this directory and you will be all right. You don't need the quotes, either, unless you have multiple words to search on.

Good luck
Chris
It wasn't me!!!!
Uday_S_Ankolekar
Honored Contributor

Re: help with grep

Hi,

cd /code

grep -i serisc *

Depend on the size of the directory it may take some time to give you output

Goodluck..
-USA..
Good Luck..
MANOJ SRIVASTAVA
Honored Contributor

Re: help with grep

Hi Jennifer

Try this


cd /code
grep seriSC *


it will give u the files which have this string

Manoj