<<>> <> <> <> <> <> <> <<>> QFIND CEDAR 10.0 QFind -- a quick simple file search program Richard E. Sweet © Copyright 1987, 1990, 1992 Xerox Corporation. All rights reserved. Abstract: QFind is a file scanning program similar in spirit to Grep. It lacks most of the functionality of Grep, but makes up for it by being 3-4 times as fast. Created by: Richard E. Sweet Maintained by: Michael Plass:PARC:Xerox Keywords: searching XEROX Xerox Corporation Palo Alto Research Center 3333 Coyote Hill Road Palo Alto, California 94304 QFind is a file scanning program similar in spirit to Grep. It lacks most of the functionality of Grep, but makes up for this by being 3-4 times as fast. It finds only simple text keys (no regular expressions, wild cards, etc.). QFind has the following optional switches, which must immediately follow the command name: -c be case sensitive -f list file names only -o open files successfully searched -d search the files in the Directory and Exports clauses of the named DF file -m use source version maps to supply directory information -p print file position of first match along with name (useful with -f only) -q the last option; use if your search key begins with a dash -r DF/module search -s print the short names of the files and separate the file listings -w match words only Typical usages: QFind QFind -c QFind -c -f -m <> QFind -fcm <> QFind -d QFind -d <> QFind -wc -r [PCedar2.0]PCedar.df ViewersWorldExtras.CallWhenWorldSet <> QFind -wc CallWhenWorldSet $(CitingFiles ViewersWorldExtras) <> QFind -wc -r $ ViewersWorldExtras.CallWhenWorldSet $(CitingFiles ViewersWorldExtras) <> If contains blanks, it must be enclosed in quotes ("). This is approximately equivalent to Grep -o [-c] [-w] . The number of matches reported by the two programs differs in that QFind, after printing out the line containing a match, doesn't bother to look on the rest of that line for further matches. A DF/module search is useful for answering the question: who references item X from interface Y? The key must be of the form Y.X. The DF files given with the -r switch are elaborated. Whenever a suite either defines or imports Y.mob, the source files in that suite are considered. The source files resulting from all command switches are filtered according to whether they include the token Y; those that pass are searched for X. A suite is the DFs (excluding the subsidiary suites) included in a DF whose base name either ends in "-Suite" or lacks a dash. The base name of a file name is the part of the last component before its extension. For example, [PCedar2.0]PCedar.df heads a suite, which includes a bunch of other DFs that head their own suites; there is only one DF (PCedar.df itself) in the suite headed by PCedar.df. QFind uses the Boyer-Moore sub-linear search algorithm; the longer the key, the faster the search.