searching for a file

Blair P. Houghton bph at buengc.BU.EDU
Wed May 17 11:55:15 AEST 1989


In article <167 at attcdso.UUCP> ram at attcdso.UUCP (R. Meesters, Tech Support, AT&T Canada DSO ) writes:
>In article <1530 at cmx.npac.syr.edu>, gefuchs at skolem.uucp (Gill E. Fuchs) writes:
>> 
>> how would one search for a filename in a directory hierarchy?
>
>I often use 	find / -name firp -print 	to find files when I don't
>know where the heck they exist.

Some versions of find(1) (notably the one with this here Umax) are
implemented to look in a database (usually stored in /usr/lib/find.code)
that is updated periodically with the names of all world-accessible
files on the system.  When invoking find(1), you simply use

	find pattern

which gives the same output as

	find / -name pattern -print

except that any files written since the database was updated (weekly,
likely) won't be available, but the amount of time it takes to get the
whole set of pattern-matching filenames is miniscule compared to how
long a regular directory-search takes.

				--Blair
				  "I think it's alright..."



More information about the Comp.unix.questions mailing list