[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Search certain string in a directory



On Sun, 29 Apr 2007, rocky wrote:

Hey,

I have a directory and several sub-directory and files reside within
it. I'm wondering is there any command I can use to search for the
certain tring's ocurence? Can any of you help me please?

Thanks a lot in advance!
Rocky



find ~/tmp/ -type f -exec grep -l mystring {} \;

this will recursivly look for files in ~/tmp/ and print out files that have mystring in them.

-+-
8 out of 10 Owners who Expressed a Preference said Their Cats Preferred Techno.



Reply to: