files
Kevin Kempter
kevin at kevinkempterllc.com
Mon Nov 27 23:39:30 UTC 2006
On Monday 27 November 2006 15:54, Steve Searle wrote:
> Around 10:34pm on Monday, November 27, 2006 (UK time), eng.waleed scrawled:
> > How can I find the files which containing a particular string in
> > directory and all subdirectory
>
> grep -r string directory/*
>
> Steve
find <dir> -exec grep -l "string" \;
i.e.
find . -exec -l "My String" \;
-- will find all files with the string 'My String' (doesn't match the quotes)
starting at the current dir (.) and below
The -l for grep says only print the filename
More information about the users
mailing list