Date: 22 Dec 97 07:38:49 +0100 From: leifn@image.dk (Leif Neland) To: freebsd-questions@freebsd.org Subject: Re: using the find command Message-ID: <6de_9712220828@swimsuit.swimsuit.roskildebc.dk>
next in thread | raw e-mail | index | archive | help
At 22 Dec 97 06:07:51 Joel Ray Holveck wrote regarding Re: using the find command >>> Can somebody give me the syntax for using the find command to search >>> all the files in a tree for a specific string? >> find . -name "*" -exec grep -l string {} \; JR> This is less efficient than JR> grep string `find . -print` JR> JR> Also note that '-name *' is redundant in find. It is less efficient, because your version greps the filenames, while the problem was to grep the contents of the files Leif Neland leifn@image.dk --- |Fidonet: Leif Neland 2:234/49 |Internet: leifn@image.dk
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6de_9712220828>