Let’s take a look at these commands:
locate whereis which find
locate
Order_
This command will traverse your entire filesystem and find every occurrence of that keyword, so as you can imagine the results can be overwhelming.
locate keyword
locate
Uses a database that is usually updated daily, so if you’re searching for something recently created, it might not come back in your search. you can use it
updatedb
command to manually update locate
database of commands.
locate aircrack-ng
whereis
Order_
In Linux, executable files are called binary files, if you want to locate binary files, whereis
than locate
.
whereis binary
This command will return the binary file location, its source code and man pages (if available)
whereis aircrack-ng
which
Order_
PATH
in Linux The variable holds the directory in which the operating system looks for commands you execute at the command line.
which binary
…
The post Find stuff in Linux An introduction to locate, whereis, which and find commands first appeared on Lenix Blog .
This article is reprinted from https://blog.p2hp.com/archives/8729
This site is for inclusion only, and the copyright belongs to the original author.