Descending directory hierarchy?

Chris Torek chris at mimsy.umd.edu
Sun Dec 3 05:22:56 AEST 1989


>In article <1372 at lakesys.lakesys.com> johnb at lakesys.lakesys.com
>(John C. Burant) writes:
>>... I've been thinking about writing a program [for SysV] that will act 
>>like the BSD find... it list all files with the phrase you look for in
>>the filename...

In article <1989Dec2.135436.22689 at virtech.uucp> cpcahil at virtech.uucp
(Conor P. Cahill) writes:
>First of all the -name parameter to find acts the same way in both system V
>and in BSD.

John Burant was probably referring to the Ames Fast File Finder, invoked
on Tahoe-or-later BSD systems as

	find foo

which is much like

	find / -name '*foo*' -print

but is *MUCH* faster (I mean really stupendously faster; you have to pipe
this through `more' to have a chance of reading it).  It works by reading
a database (rebuilt at the system administrator's discretion, typically
once each Sunday morning), so it can only get those files listed in the
database (typically those whose name can be found by the user `nobody').

To quote the find manual:

     The second form rapidly searches a database for all path-
     names which match pattern.  Usually the database is recom-
     puted weekly and contains the pathnames of all files which
     are publicly accessible.  If escaped, normal shell "glob-
     bing" characters (`*', `?', `[', and ']') may be used in
     pattern, but the matching differs in that no characters
     (e.g. `/') have to be matched explicitly.	As a special
     case, a simple pattern containing no globbing characters is
     matched as though it were *pattern*; if any globbing charac-
     ter appears there are no implicit globbing characters.
	.
	.
	.
BUGS
     The first form's syntax is painful, and the second form's
     exact semantics is confusing and can vary from site to site.

[`semantics is'??]
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at cs.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.questions mailing list