1, which
View the command with the which command (and only the executable file under $path to use which to view the file)
How to use: Which LS
2, Whereis
The Whereis command can be used only 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.
Whereis and locate are all looking for database files, so the lookups are fast and the Find command is slow by traversing the Linux hard drive.
3, locate
Do not find the/tmp/folder
The Mlocate package needs to be installed through the Yum tool before it can be used, and the locate command is found through the database.
Before you can use the Locate command to find a file, you need to update the database with the UpdateDB command first
If there is no updatedb after creating a new file, locate cannot find the file
4. Find
How to use:
find/tmp/-name "LongFei" (Find all files named LongFei under the/tmp/folder)
find/tmp/-name "long*" (Find all files with a long beginning under the/tmp/folder)
find/tmp/-type D (Find the directory under the/tmp/folder)
find/tmp/-type F (find files under the/tmp/folder)
find/tmp/-type b (Find block devices under the/tmp/folder)
find/tmp/-type C (Find character devices under the/tmp/folder)
find/tmp/-type S (Locate the socket under the/tmp/folder)
find/tmp/-mtime-10 (Create/modify all files within 10 days)
find/tmp/-mmin-10 ( Create/Modify all files in less than 10 minutes )
find/tmp/-atime-10 (all files with read/execute time within 10 minutes)
find/tmp/-ctime-10 (modify file attributes within 10 minutes of all files)
Find/-inum 141418 (query files by inode number)
View Mtime;atime;ctime's Commands
Stat 1.txt (View 1.txt of three time)
Related commands for Linux search