1.whereis
Whereis who
whereiscan only search binaries (-B), man Help file (-m) and source code file (-s)
2.locate
So sometimes when you just add a file, it may not be found and requires a command to be executed manually updatedb
(This command must be executed first in our environment). It can be used to find different file types under the specified directory,
To find all files starting with SH in/etc:
$ locate/etc/sh
Note that it is not just looking in the/etc directory, but also automatically recursively looking for subdirectories.
$ Locate /usr/share/\*.jpg Note that you want to escape the backslash * before adding the number , otherwise you will not find
3.which
whichitself is a shell built-in command that we typically use which to determine if a specified software is installed
Because it only PATH searches for the command from the path specified by the environment variable:
4.find
Should be the most powerful of these commands, not only through the file type,
File names and can be searched based on the attributes of the files (such as file timestamps, file permissions, etc.)
$ sudo find /etc/-name interfaces
Note the path to the Find command is the first parameter , and the basic command format is find [path] [option] [action].
Search files under linux command whereis/which/find/locate