Under Linux often with the Find command, my own most commonly used is find Whereis locate
About Find
I use the basic functions of find, such as
Find /-name filename
Search for files in a directory.
The find command supports regular and can be written as
find . -name abc*
But the find lookup is very slow, and find finds more content that can be combined with the grep command.
The function of find is very powerful, as follows:
Find is the most common and powerful look-up command you can use to find any file you're looking for. Find uses the following format: $ find < Specify directory > < specify conditions > < specify action >-< Specify directory;: the directory to be searched and all its subdirectories. The current directory is assumed by default. -< specified conditions;: The characteristics of the file to be searched. -< specify actions;: Specific processing of search results. If no parameters are added, find searches the current directory and its subdirectories by default, and does not filter any results (that is, all files are returned) and displays them all on the screen. Example of use of find: $ find. -name ' my* ' searches the current directory (with subdirectories, below), all files with the file name beginning with my. $ find. -name ' my* '-ls searches the current directory for all files with the file name beginning with my, and displays their details. $ find. -type f-mmin- searches the current directory for all the normal files that have been updated in the last 10 minutes. If you do not add the-type f parameter, search for normal files + special files + directories.
About Whereis
Whereis is used to search for programs and cannot search for anything else.
Whereis FTP
About the use of Whereis
The Whereis command can only be used 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. Example of use of the Whereis command: $ whereis grep
About Locate
Locate is a faster find.
Locate filename
As above, the usage is super simple.
But locate has a problem, if a file is new, then you use locate most likely to find this file.
The locate command is actually another way of writing "Find-name", but much faster than the latter because it does not search for a specific directory, but instead searches for a database (/var/lib/locatedb), which contains all the local file information. The Linux system automatically creates this database and updates it automatically once a day, so you can't find the latest changed files using the Locate command.
Some uses of locate
Locate /etc/shLocate ~/Locate -i ~/m Search user home directory, all files beginning with M, And the case is ignored.
Reference:
One Linux command per day: Locate command
Five Find commands for Linux
The Find command under Linux