Peter’s Soapbox
Man Page Minute - whereis
October 30, 2007 on 1:39 pm | In ManPageMinute, Techspeak |WHEREIS(1) WHEREIS(1)
NAME
whereis - locate the binary, source, and manual page files for a command
SYNOPSIS
whereis [ -bmsu ] [ -BMS directory... -f ] filename …
DESCRIPTION
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 .ext, for example, .c.
Prefixes of s. resulting from use of source code control are also
dealt with. whereis then attempts to locate the desired program in a
list of standard Linux places.
OPTIONS
-b Search only for binaries.
-m Search only for manual sections.
-s Search only for sources.
-u Search for unusual entries. A file is said to be unusual if it
does not have one entry of each requested type. Thus
whereis -m -u * asks for those files in the current direc
tory which have no documentation.
-B Change or otherwise limit the places where whereis searches for
binaries.
-M Change or otherwise limit the places where whereis searches for
manual sections.
-S Change or otherwise limit the places where whereis searches for
sources.
-f Terminate the last directory list and signals the start of file
names, and must be used when any of the -B, -M, or -S options
are used.
EXAMPLE
Find all files in /usr/bin which are not documented in /usr/man/man1
with source in /usr/src:
example% cd /usr/bin
example% whereis -u -M /usr/man/man1 -S /usr/src -f *
FILES
/{bin,sbin,etc}
/usr/{lib,bin,old,new,local,games,include,etc,src,man,sbin,
X386,TeX,g++-include}
/usr/local/{X386,TeX,X11,include,lib,man,etc,bin,games,emacs}
SEE ALSO
chdir(2V)
BUGS
Since whereis uses chdir(2V) to run faster, pathnames given with the
-M, -S, or -B must be full; that is, they must begin with a /.
whereis has a hard-coded path, so may not always find what youre look
ing for.
8 May 1994 WHEREIS(1)
No Comments yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
You must be logged in to post a comment.
Archives:
- October 2008 (2)
- September 2008 (2)
- August 2008 (7)
- July 2008 (22)
- June 2008 (7)
- May 2008 (14)
- April 2008 (13)
- March 2008 (7)
- February 2008 (13)
- January 2008 (8)
- December 2007 (11)
- November 2007 (10)
- October 2007 (8)
- September 2007 (18)
- August 2007 (25)
- July 2007 (10)
- June 2007 (2)
- May 2007 (1)
- March 2007 (4)
- February 2007 (3)
- January 2007 (1)
- December 2006 (1)
- October 2006 (3)
- September 2006 (1)
- August 2006 (9)
- July 2006 (2)
- June 2006 (6)
- May 2006 (4)
- April 2006 (3)
Blogroll
- Fresh Ubuntu - The Fresh Ubuntu podcast
- I, Blog - The blog of my former partner in podcasting crime
- Lotta Linux Links - Lotta Linux Links
- Partis Scientia - Scott’s Linux Tech Blog
- Scamwagon - The blog of my colleague, Scott McGrath









