Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Dec 1997 09:44:30 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Wolfram Schneider <wosch@cs.tu-berlin.de>
Cc:        michael dorin <mike@chaski.com>, questions@FreeBSD.ORG
Subject:   Re: using the find command
Message-ID:  <19971223094430.20189@lemis.com>
In-Reply-To: <p1id8ipa92u.fsf@panke.panke.de>; from Wolfram Schneider on Mon, Dec 22, 1997 at 12:52:41PM %2B0100
References:  <199712211441.OAA13857@chaski.com> <p1id8ipa92u.fsf@panke.panke.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 22, 1997 at 12:52:41PM +0100, Wolfram Schneider wrote:
> michael dorin <mike@chaski.com> writes:
>> Can somebody give me the syntax for using the find command to search
>> all the files in a tree for a specific string?
>
> $ locate string

While this is a useful tool, it doesn't search a tree: it looks up the
names in a database which is built every Friday night by the
/etc/weekly script.  If you don't leave your machine running
overnight, you won't have this file, so the method won't work.  It
also won't work for any files added since last Friday.

> $ find . -name '*string*' -print

You don't need -print on our version of find (you do for System V).

Greg



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