Fast file scan

Bruce Lilly bruce at balilly.UUCP
Tue Oct 2 14:14:51 AEST 1990


In article <143198 at sun.Eng.Sun.COM> lm at sun.UUCP (Larry McVoy) writes:
>In article <299 at lysator.liu.se> pen at lysator.liu.se (Peter Eriksson) writes:
>>I`d like to know how to scan all files in a directory (and it's sub-
>>directories) for a specific string (without regular expressions) as fast
>>as possible with standard Unix tools and/or some special programs.
>>
>>(I've written such a program, and would like to compare my implementation
>>of it with others.)
>>
>>(Using the find+fgrep combination is slooooow....)

Depends on how you do it. Try:
find . -print | xargs fgrep string

>>
>>Any ideas?
>
>I would probably use ftw(3).  I've found it a useful tool.  

I believe find uses ftw.

--
	Bruce Lilly		blilly!balilly!bruce at sonyd1.Broadcast.Sony.COM



More information about the Comp.unix.misc mailing list