50.5 whereis: Finding Where a Command Is Located
command helps you to locate the executable file,
source code, and manual pages for a program.
I use it primarily as a
sanity check; if I type
Output from whereis typically looks like this:
This says that the executable file is /usr/ucb/more , the command's internal help file is /usr/lib/more.help , and the manual page is /usr/man/man1/more.1 .
whereis has a few options worth mentioning. -b says "only report the executable name"; -m says "only report the location of the manual page"; -s means "only search for source files"; and -u says "only issue a report if any of the requested information (executable, manual page, source) is missing."
There are other options for modifying the list of directories through which whereis searches; if you need these, check your manual pages.