Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the whereis command under Linux

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to use the whereis command under Linux". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to use the whereis command under Linux.

Searching for files under Linux usually uses whereis or locate to check, because whereis and locate use databases to search for data, so they are quite fast, and there is no actual search for hard drives.

1. Command format:

Whereis [- bmsu] [BMS directory name-f] file name

Command parameter

-b locate the executable file.

-m locate the help file.

-s locate the source code file.

-u search for files under the default path other than executable files, source code files, and help files.

-B specifies the path to search for executable files.

-M specifies the path to search for help files.

-S specifies the path to search for source code files.

Examples of use:

* * example 1: find out all the files related to the file

Command: whereis svn

[root@localhost ~] # whereis tomcattomcat: [root@localhost ~] # whereis svnsvn: / usr/bin/svn / usr/local/svn / usr/share/man/man1/svn.1.gz

* * instance 2: * * locate a certain type of file

Command: whereis-b svn to find executable file path

Whereis-m svn find the path to the description document

Whereis-s svn finds the source file path

[root@localhost ~] # whereis-b svnsvn: / usr/bin/svn / usr/local/svn [root@localhost ~] # whereis-m svnsvn: / usr/share/man/man1/svn.1.gz [root@localhost ~] # whereis-s svnsvn: [root@localhost ~] # Thank you for reading. This is the content of "how to use whereis commands under Linux". After studying this article I believe you have a deeper understanding of how to use the whereis command under Linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report