whereis

locate programs

whereis [-abmqu] [-BM dir … -f] program

Checks the standard binary and man page directories for programs and displays the paths . Leading path name components are stripped and any single trailing extension added by gzip, compress, or bzip2i.

The default search path is the string returned by sysctl for user.cs_path , with /usr/libexec and the $PATH appended. Manual pages are searched by default along the $MANPATH.

-fDelimits the list of directories after the -B, -M, or -S options, and indicates the beginning of the program list.
-mSearch for manual pages.
-Mdirectories to search for manual pages. Requires the -f option.
-bSearch for binaries.
-Bdirectories to search for binaries. Requires the -f option.
-aReport all matches instead of only the first of each requested type.
-q("quiet"). Suppress the output of the utility name in front of the normal output line. This can become handy for use in a backquote substitution of a shell command line, see EXAMPLES.
-uSearch for "unusual" entries. i.e. files that do not have at least one entry of each requested type. Only the name of the unusual entry is printed.

1EXAMPLES

Find all utilities under /usr/bin that do not have documentation: whereis -m -u /usr/bin/* : SEE ALSO: find(1), locate(1), man(1), which(1), sysctl(8)