whereis
Locate binary, source, and man page files
TLDR
SYNOPSIS
whereis [-bmsuf] [-BMS directory... -f] name...
DESCRIPTION
whereis locates the binary, source, and manual page files for a command by searching a set of standard locations. Unlike which, it searches predefined directories rather than the PATH variable, and can find source and documentation files.The command uses hardcoded directory lists that may include /bin, /sbin, /usr/bin, /usr/share/man, /usr/src, and similar system directories. Use -l to see the actual search paths on your system.
PARAMETERS
-b
Search only for binaries-m
Search only for manual sections-s
Search only for sources-u
Search for unusual entries (commands with more than one binary, or no manual)-B list
Limit binary search to specified directories-M list
Limit manual search to specified directories-S list
Limit source search to specified directories-f
Terminate directory list (required when using -B, -M, or -S)-l
Output list of effective search paths
CAVEATS
May not find binaries in non-standard locations (use which for PATH-based lookup). Source directories are often empty on binary distributions. Results depend on the compiled-in search paths which vary between distributions.
HISTORY
Originated in 3BSD Unix (1979) at UC Berkeley. One of the early Berkeley additions to Unix for locating program components. Part of util-linux on modern Linux systems.
