Linux whereis-find binaries, code and other related file paths

Source: Internet
Author: User
Tags svn

recommended: More Linux file Lookup and comparison commands attention:Linux commands Daquan

The whereis command is used to locate the path of the instruction's binaries, source code files, and man manual pages, and other related files.

The Whereis command can only be used for program name searches, and only binary files (parameter-B), man description file (parameter-m), and source code file (parameter-s) are searched. If the argument is omitted, all information is returned.

The Whereis lookup is very fast compared to find, because the Linux system records all the files in the system in a database file, and when you use Whereis and the locate described below , the data is looked up from the database. Instead of looking through the hard drive like the Find command, the efficiency will naturally be high. However, the database file is not updated in real time and is updated once a week by default, so when we use Whereis and locate to find files, we sometimes find data that has been deleted, or just created the file, but cannot find it because the database file is not updated.

Grammar
Whereis (option) (parameter)
Options
-B: Find only binary files;-b< directory;: Find binaries only in the directory you set;-F: The path name before the file name is not displayed;-M: Only find the description file;-m< directory;: Find the description file only in the directory of the settings;-S: Find only the original code file ;-s< directory > Find the original code file only in the directory under Settings;-U: Finds files that do not contain the specified type.
Parameters

Instruction name: The name of the instruction for the binaries, source files, and man manual pages to find.

Instance

Find all the relevant files

[[email protected] ~]# whereis tomcattomcat:[[email protected] ~]# whereis SVNSVN:/usr/bin/svn/usr/local/svn/usr/share /man/man1/svn.1.gz

Description: Tomcat is not installed, can not find out, SVN installation found a lot of related files

Only binary files are found

[Email protected] ~]# whereis-b SVNSVN:/usr/bin/svn/usr/local/svn[[email protected] ~]# whereis-m SVNSVN:/usr/share/ Man/man1/svn.1.gz[[email protected] ~]# whereis-s SVNSVN:

Description: Locate whereis -m svn the description document path and whereis -s svn find source file.

Linux whereis-find binaries, code and other related file paths

Related Article

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.