.TH qfind "" "" Command
.PC "Quickly find all files with a given name"
\fBqfind [\-adpv] \fIname \fB...\fR
\fBqfind [\-bv] [-s\fIdirectory\^\fB]\fR
.PP
.HS
.SH Options:
.IC \fB\-a\fR
All: search for files or directories
.IC \fB\-b\fR
Build file data base
.IC \fB\-d\fR
Search for directories only
.IC \fB\-p\fR
Partial name matching
.IC \fB\-s\fIdirectory\fR
Suppress the reading of \fIdirectory\fR and its children when
building the data base
.IC \fB\-v\fR
Give verbose output
.Pp
Run as \fBroot\fR when using \fB\-b\fR to find everything.
.HE
The command
.B qfind
prints the full path name of each file with a given
.IR name .
It reads a prebuilt data base, for the sake of speed.
This makes
.B qfind
much faster than
.B find
for locating a file; but it does mean that changes to the file system
since the data base was last updated will not be reflected in what
.B qfind
prints.
.PP
The option
.B \-b
tells
.B qfind
to build its data base in file
.BR /usr/adm/qffiles .
By default, this data base names every file in your system.
If you wish to suppress a directory, name it with the \fB\-s\fR option.
For example, to build the data base but suppress the directory
.BR /usr/spool ,
use the command:
.DM
	qfind -b -s/usr/spool
.DE
.PP
This command excludes the contents of directory
.B /usr/spool
and all of its children
from the
.B qfind
data base.
.PP
When invoked without the
.B \-b
option,
.B qfind
reads its data base to find file names.
.PP
Normally,
.B qfind
prints the full path name of each file in the \*(CO system
that ends with the given
.I name 
(as it was when you last executed
.BR "qfind \-b" .)
With the
.B \-d
option,
.B qfind
prints matching directories instead of files.
With the
.B \-a
option,
.B qfind
prints both matching files and matching directories.
.PP
Option
.B \-p
specifies partial name matching.
For example,
.B "qfind \-p foo"
matches files
.B /src/foo.c
and
.B /doc/foo.r
as well as file
.B /usr/bin/foo.
.PP
Finally, option
.B \-v
tells
.B qfind
to print verbose output.
.SH Files
.B /usr/adm/qffiles
.SH "See Also"
.Xr "commands," commands
.Xr "cron," cron
.Xr "find," find
.Xr "whereis," whereis
.Xr "which" which
.SH Notes
Building the
.B qfind
data base with the
.B \-b
option is slow, but it speeds finding files.
You may find it convenient to use
.B cron
to execute
.B "qfind \-b"
to rebuild the data base at night, or some other time when the machine is
otherwise idle.
.PP
If you want to include all files in the data base, the superuser
.B root
must run
.BR "qfind \-b" .
