Whereis of Linux commands I used-find the command location

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.