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

One valid solution is to combine find (to find the files) and
grep (to search in them). For the combination, you can use
the famous back-tics.

        % grep "expression" `find /path/to/files/ -mtime -2 -print`

Of course, there are surely easier, faster and better means,
but from this one, I know it just works. :-) Furthermore, I
think -print is optional here.

If you want to use the Midnight Commander, use Meta-? for a
combined dialog:

        +----------------- Find File ------------------+
        |                                              |
        | Start at: _______________________________[^] |
        |                                              |
        | Filename: _______________________________[^] |
        |                                              |
        | Content:  _______________________________[^] |
        |                                              |
        | [ ] case Sensitive                           |
        |                                              |
        | [< OK >]  [ Tree ]                [ Cancel ] |
        +----------------------------------------------+

That's what I mostly use.




-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"

Reply via email to