Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 May 2010 22:18:20 -0400
From:      Roy Hubbard <roy@ghettodexter.com>
To:        Steve Bertrand <steve@ipv6canada.com>
Cc:        "questions@freebsd.org" <questions@freebsd.org>
Subject:   Re: Find a file with an unknown name
Message-ID:  <4BF1F8EC.5070900@ghettodexter.com>
In-Reply-To: <4BF1F84F.1000700@ipv6canada.com>
References:  <4BF1F84F.1000700@ipv6canada.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>   
Maybe this will work.

 From the top of the directory structure:

grep -R {expression} .



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BF1F8EC.5070900>