Link: http://codingstandards.iteye.com/blog/986891 (reprinted please indicate the source)
Description
The whereis command is used to locate the command location, including the execution file, source code, and manual page file (locate the binary, source, and manual page files for a command ). If you want to find the location of any file, you can use commands such as locate or find.
Common Parameters
Format: whereis <command>
Find the location of the specified command <command>, including the execution file, source code, and manual page file.
Format: whereis-B <command>
Only find the location of the execution file of the specified command <command>.
Format: whereis-M <command>
Only find the location of the manual page file of the specified command <command>.
Format: whereis-S <command>
Only find the location of the source code of the specified command <command>.
Example 1
[Root @ jfht ~] # Whereis
Whereis:/usr/bin/whereis/usr/share/man/Man1/whereis.1.gz
[Root @ jfht ~] # Whereis-B whereis
Whereis:/usr/bin/whereis
[Root @ jfht ~] # Whereis-M whereis
Whereis:/usr/share/man/Man1/whereis.1.gz
[Root @ jfht ~] # Whereis-s whereis
Whereis:
[Root @ jfht ~] #
Example 2
[Root @ jfht ~] # Whereis MySQL
MySQL:/usr/bin/MySQL/usr/lib/MySQL/usr/include/MySQL/usr/share/man/Man1/mysql.1.gz
[Root @ jfht ~] # Whereis-B MySQL
MySQL:/usr/bin/MySQL/usr/lib/MySQL/usr/include/MySQL/usr/share/MySQL
[Root @ jfht ~] # Whereis-M MySQL
MySQL:/usr/share/man/Man1/mysql.1.gz
[Root @ jfht ~] # Whereis-s MySQL
MySQL:
[Root @ jfht ~] #
Problem-related materials
[1] program life Linux whereis command
Http://www.chengxurensheng.com/htm/2011/2/808.htm
[2] square inch walk all the way, ten years don't go back to Linux whereis command details
Http://www.cnblogs.com/wllyy189/archive/2008/04/09/1144131.html
[3] Linux security online Linux whereis command parameters and usage --- Linux File Location command
Http://www.linuxso.com/command/whereis.html
[4] five search commands in coqin Linux: Find, locate, whereis, Which, Type
Http://www.kuqin.com/linux/20091009/70532.html