find and searching for specific expression in files

郑天宇 zhengtianyu at
Sun May 31 15:48:10 UTC 2009

On Sat, May 30, 2009 at 11:25:12AM +0200, Zbigniew Szalbot wrote:
> Hello,
> Can you please give me a hint how to use find to search for a specific
> text within files?

If you just want the filenames which contain the string you are
searching for, use the "-l" argument to tell grep to print out the

For example:

grep -rl "string" .

will print out all the filenames containning "string".

> -- 
> Zbigniew Szalbot
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list