whereis

来源:百度文库 编辑:神马文学网 时间:2024/04/27 11:42:06

NAME

whereis - locate the binary, source, and manual page files for a command 

SYNOPSIS

whereis[-bmsu] [-BMSdirectory...-f]filename... 

DESCRIPTION

whereislocates source/binary and manuals sections for specifiedfiles.The supplied names are first stripped of leading pathname componentsand any (single) trailing extension of the form.ext,for example,.c.Prefixes ofs.resulting from use of source code control are also dealt with.whereisthen attempts to locate the desired program ina 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 doesnot have one entry of each requested type.Thus`whereis  -m  -u  *'asks for those files in the currentdirectory which have no documentation.
-B
Change or otherwise limit the places wherewhereissearches for binaries.
-M
Change or otherwise limit the places wherewhereissearches formanual sections.
-S
Change or otherwise limit the places wherewhereissearches for sources.
-f
Terminate the last directory list and signals the start of file names,andmustbe used when any of the-B,-M,or-Soptions are used.
 

EXAMPLE

Find all files in/usr/binwhich are not documentedin/usr/man/man1with 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)