summaryrefslogtreecommitdiffstats
path: root/usr.bin/whereis/whereis.1
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1996-06-15 12:29:48 +0000
committerjoerg <joerg@FreeBSD.org>1996-06-15 12:29:48 +0000
commit41ecc2cea6c46d29ed78c0f919cfccb68ebd12f0 (patch)
treea1723f32d78a05518ab65112be3df998b45a43cc /usr.bin/whereis/whereis.1
parentf420d94a194ef9f4bea9befa8aed4171e76313b1 (diff)
downloadFreeBSD-src-41ecc2cea6c46d29ed78c0f919cfccb68ebd12f0.zip
FreeBSD-src-41ecc2cea6c46d29ed78c0f919cfccb68ebd12f0.tar.gz
A totally revamped whereis(1), bringing back all the functionality of
the 4.3BSD command. Rewritten from scratch after the old man page, taking account for the different situation with man pages and source tree hierarchy (re: /usr/src/gnu) of the FreeBSD project. Reviewed by: wosch (actually loooong time ago)
Diffstat (limited to 'usr.bin/whereis/whereis.1')
-rw-r--r--usr.bin/whereis/whereis.1100
1 files changed, 87 insertions, 13 deletions
diff --git a/usr.bin/whereis/whereis.1 b/usr.bin/whereis/whereis.1
index fa1f5a4..6c5a4f7 100644
--- a/usr.bin/whereis/whereis.1
+++ b/usr.bin/whereis/whereis.1
@@ -31,33 +31,107 @@
.\"
.\" @(#)whereis.1 8.2 (Berkeley) 12/30/93
.\"
-.Dd December 30, 1993
+.\" $Id$
+.\"
+.Dd June 15, 1996
.Dt WHEREIS 1
-.Os BSD 3
+.Os FreeBSD
.Sh NAME
.Nm whereis
.Nd locate programs
.Sh SYNOPSIS
.Nm whereis
-.Op Ar program ...
+.Op Fl bms
+.Op Fl u
+.Op Fl BMS dir ... Fl f
+.Ar program ...
.Sh DESCRIPTION
The
.Nm whereis
-utility checks the standard binary directories for the specified programs,
-printing out the paths of any it finds.
+utility checks the standard binary, manual page, and source
+directories for the specified programs, printing out the paths of any
+it finds. The supplied names are first stripped of leading path name
+components, any single trailing extension of the form
+.Ql .ext ,
+and the leading
+.Ql s.
+or trailing
+.Ql ,v
+from a source code control system.
.Pp
-The path searched is the string returned by the
+The default path searched is the string returned by the
.Xr sysctl 8
utility for the
.Dq user.cs_path
-string.
+string, with
+.Pa /usr/libexec
+and the current user's
+.Ev $PATH
+appended. Manual pages are searched by default along the
+.Ev $MANPATH .
+Program sources are located in a list of known standard places,
+including all the subdirectories of
+.Pa /usr/src
+and
+.Pa /usr/ports .
+.Pp
+The following options are available:
+.Bl -tag -width indent
+.It Fl B
+Specify directories to search for binaries. Requires the
+.Fl f
+option.
+.It Fl M
+Specify directories to search for manual pages. Requires the
+.Fl f
+option.
+.It Fl S
+Specify directories to search for program sources. Requires the
+.Fl f
+option.
+.It Fl b
+Search for binaries.
+.It Fl f
+Delimits the list of directories after the
+.Fl B ,
+.Fl M ,
+or
+.Fl S
+options, and indicates the beginning of the
+.Ar name
+list.
+.It Fl m
+Search for manual pages.
+.It Fl s
+Search for source directories.
+.It Fl u
+Search for
+.Dq unusual
+entries. A file is said to be unusual if it does not have one entry
+of each requested type.
+.El
+.Sh EXAMPLE
+The following finds all utilities under
+.Pa /usr/bin
+that do not have documentation:
+.Dl whereis -m -u /usr/bin/*
.Sh SEE ALSO
-.Xr sysctl 8 ,
-.Sh COMPATIBILITY
-The historic flags and arguments for the
-.Nm whereis
-utility are no longer available in this version.
+.Xr locate 1 ,
+.Xr man 1 ,
+.Xr sysctl 8
+.Sh BUGS
+The search for sources is implemented as a quick search as the
+first-level subdirectory of each element of the list of source
+directories first. If this didn't succeed, the utility
+.Xr locate 1
+is requested to do the search in deeper nested subdirectories. This
+might take some time, and will only succeed if the locate database is
+up-to-date.
.Sh HISTORY
The
.Nm whereis
-command appeared in 3.0BSD.
+command appeared in
+.Bx 3.0 .
+This version re-implements the historical
+functionality that was lost in
+.Bx 4.4 .
OpenPOWER on IntegriCloud