mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-11-17 12:08:43 +00:00
595a3dfaea
file - added describe entry, rez fork - merged into GNO base build
176 lines
4.0 KiB
Groff
176 lines
4.0 KiB
Groff
.\"
|
|
.\" $Id: whereis.1,v 1.2 1997/09/30 04:22:43 gdr Exp $
|
|
.\"
|
|
.TH WHEREIS 1 "25 September 1997" GNO "Commands and Applications"
|
|
.SH NAME
|
|
whereis \- locate the binary, source, and manual page files for a command
|
|
.SH SYNOPSIS
|
|
.B whereis
|
|
[
|
|
.B \-bcmsuV
|
|
] [
|
|
.B \-BMS
|
|
.IR directory .\|.\|.
|
|
.B \-f
|
|
]
|
|
\fIfilename\fP\|
|
|
.SH DESCRIPTION
|
|
This manual page documents
|
|
.BR whereis
|
|
version 1.0.3.
|
|
.LP
|
|
.B whereis
|
|
locates source/binary and manuals sections for specified
|
|
files.
|
|
The supplied names are first stripped of leading pathname components
|
|
and any (single) trailing extension of the form
|
|
.BR .ext ,
|
|
for example,
|
|
.BR .c .
|
|
Prefixes of
|
|
.B s.
|
|
resulting from use of source code control are also dealt with.
|
|
.B whereis
|
|
then attempts to locate the desired program in
|
|
a list of standard places, defined by the
|
|
.BR /etc/whereis.conf
|
|
configuration file. (The location of this file can be overridden with the
|
|
.BR WHEREIS_CONF
|
|
environment variable.)
|
|
.SH OPTIONS
|
|
.IP \fB\-b\fR
|
|
Search only for binaries.
|
|
.IP \fB\-c\fR
|
|
Make the search case\-sensitive.
|
|
.sp 1
|
|
.BR NOTE :
|
|
In
|
|
.BR whereis
|
|
versions 1.2 and earlier, this flag had the opposite effect. As of
|
|
.BR whereis
|
|
version 1.3, searches are case insensitive by default since that is more
|
|
appropriate to the filesystems available to GS/OS.
|
|
.sp 1
|
|
This flag is GNO-specific.
|
|
.IP \fB\-f\fR
|
|
Terminates the last directory list and signals the start of file names. This
|
|
.I must
|
|
be used when any of the
|
|
.BR \-B ,
|
|
.BR \-M ,
|
|
or
|
|
.B \-S
|
|
options are used.
|
|
.IP \fB\-m\fR
|
|
Search only for manual sections.
|
|
.IP \fB\-s\fR
|
|
Search only for sources.
|
|
.IP \fB\-u\fR
|
|
Search for unusual entries. A file is said to be unusual if it does
|
|
not have one entry of each requested type. Therefore
|
|
.B "whereis -m -u *"
|
|
asks for those files in the current
|
|
directory which have no documentation.
|
|
.IP \fB\-B\fR
|
|
Change or otherwise limit the places where
|
|
.B whereis
|
|
searches for binaries.
|
|
.IP \fB\-M\fR
|
|
Change or otherwise limit the places where
|
|
.B whereis
|
|
searches for
|
|
manual sections.
|
|
.IP \fB\-S\fR
|
|
Change or otherwise limit the places where
|
|
.B whereis
|
|
searches for sources.
|
|
.IP \fB\-V\fR
|
|
Print version information.
|
|
.SH "CONFIGURATION FILE"
|
|
The configuration file,
|
|
.BR /etc/whereis.conf ,
|
|
has three sections. Each section specifies a list of directories
|
|
to search. One section is used for programs, another for documentation,
|
|
and the last for sources.
|
|
.LP
|
|
Each section starts with the section identifier. The recognised identifiers
|
|
are
|
|
.BR bindirs ,
|
|
.BR mandirs ,
|
|
and
|
|
.BR srcdirs .
|
|
A colon (\fB:\fR) must follow each section identifier. Following the
|
|
colon is a whitespace-delimited list of paths that
|
|
.BR whereis
|
|
will search (these may appear on separate lines). The list is terminated
|
|
with the first semicolon (\fB;\fR) character.
|
|
.LP
|
|
The colon and semicolon characters must be delimited with whitespace; they
|
|
must not be run together with pathnames or identifiers.
|
|
.LP
|
|
If the hash (\fB#\fR) character appears on a line, it and any following
|
|
characters on that line are taken to be comments, as are blank lines.
|
|
.LP
|
|
The following is a sample of how the
|
|
.BR whereis.conf
|
|
may look.
|
|
.RS
|
|
.nf
|
|
# Sample whereis.conf file.
|
|
bindirs :
|
|
/bin
|
|
/usr/bin ;
|
|
mandirs :
|
|
/usr/man/man1
|
|
/usr/local/man/man1
|
|
;
|
|
srcdirs :
|
|
# none configured here
|
|
;
|
|
.fi
|
|
.RE
|
|
.SH EXAMPLE
|
|
Find all files in
|
|
.B /usr/bin
|
|
which are not documented
|
|
in
|
|
.B /usr/share/man/man1
|
|
with source in
|
|
.BR /usr/src/cmd :
|
|
.RS
|
|
.nf
|
|
|
|
example% cd /usr/ucb
|
|
example% whereis \-u \-M /usr/share/man/man1 \-S /usr/src/cmd \-f *
|
|
.fi
|
|
.RE
|
|
.SH ENVIRONMENT
|
|
.IP \fBWHEREIS_CONF\fR
|
|
If this environment variable is set and non-empty, it is taken as the
|
|
pathname of the configuration file, rather than using the default
|
|
.BR /etc/whereis.conf .
|
|
.SH ATTRIBUTIONS
|
|
This command was ported from 4.2BSD by Devin Reade.
|
|
.SH FILES
|
|
.IP \fB/etc/whereis.conf\fR
|
|
The
|
|
.BR whereis
|
|
configuration file. It contains a list of directories to search for
|
|
programs, documentation, and sources.
|
|
.SH BUGS
|
|
Since
|
|
.B whereis
|
|
uses
|
|
.BR chdir (2)
|
|
to run faster, pathnames given with the
|
|
.BR \-M ,
|
|
.BR \-S ,
|
|
or
|
|
.B \-B
|
|
must be full; that is, they must begin with a
|
|
.BR / .
|
|
.SH SEE ALSO
|
|
.BR find (1),
|
|
.BR locate (1),
|
|
.BR chdir (2)
|