find and searching for specific expression in files

Wojciech Puchar wojtek at wojtek.tensor.gdynia.pl
Sat May 30 15:52:45 UTC 2009


> I am using find in the following manner:
>
> find /path/to/files/ -mtime -2 -ls |less
> to find files which have been recently modified. But I would like to
> extend the search to find specific expression within files. -name is used
> to specify file name. How can I search for strings within text?

no matter how you generate the list of files to search, use grep then on 
that list


More information about the freebsd-questions mailing list