Find a file with an unknown name

Roy Hubbard roy at ghettodexter.com
Tue May 18 02:45:03 UTC 2010


Steve Bertrand wrote:
> I want to find a file that was recently created.
>
> The content within the file is known, so I can grep for that. The
> directory structure that contains the file is also known. The filename
> is not known.
>
> What command string do I use to search a directory structure for a file,
> when my search pattern only matches content and not filename?
>
> Steve
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>   
Maybe this will work.

 From the top of the directory structure:

grep -R {expression} .


More information about the freebsd-questions mailing list