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

Use the whereis command in linux to display the path of the command and related files

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces the use of linux whereis command to display commands and related files of the path, the article is very detailed, has a certain reference value, interested friends must read it!

The whereis command is used to locate the path to related files such as the command's binaries, source code files, and man man pages.

The whereis command is very fast because it is not looking around on disk, but in a database, which is automatically created by the linux system, contains information about all local files, and is updated once a day by automatically executing the updatedb command. Because of this, the search results of the whereis command are sometimes inaccurate, such as the file you just added may not be found because the database file has not been updated.

Syntax format: whereis [parameter] [command name]

Common parameters:

-b find binaries or commands-B find binaries or commands from specified directories-m find man manual files-M find man manual files from specified directories-s find source code files only-S find source code files from specified directories

Reference example

Display the program of the ln command and the location of the man man page:

[root@linuxcool ~] # whereis ln

Ln: / usr/bin/ln / usr/share/man/man1/ln.1.gz / usr/share/man/man1p/ln.1p.gz

Displays the path to the binary program for the ln command:

[root@linuxcool] # whereis-b ln

Ln: / usr/bin/ln

Displays the path to the man man page for the ln command:

[root@linuxcool] # whereis-m ln

Ln: / usr/share/man/man1/ln.1.gz / usr/share/man/man1p/ln.1p.gz above is all the contents of using the whereis command in linux to display the path of the command and related files, thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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

Servers

Wechat

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

12
Report