File searcher-- detailed explanation of find command
1. File lookup:
In the linux system, because of the large number of files, it is often necessary to find a file among the many files. If it takes a long time, it is difficult to remember where the files are stored. However, you are not more worried about this, because developers provide us with powerful file search tools. Here are two commonly used file search tools: locate and find. These two lookup tools can only be found in the file system, not in memory, because memory does not have a file system.
2. Locate command:
Locate command is based on the database to find files, the command search speed is fast, general search with the new slow, name changes less, such as: configuration files, you can use locate search, because the database needs to be updated, so there will be a little delay, locate command is generally a daily update of the database, so it is possible that the newly created files can not be found, or just deleted files in the database. You can use updatedb to update database information, database file: / var/lib/mlocate/mlocate.db
Locate usage:
Locate option parameters
Options:
-e is excluded from the scope of search.
-Q quiet mode, no error message is displayed
-n display up to # outputs
-r supports regular expressions
-I ignore case
-b base name
Example:
[root@cnode6_8 etc] # locate-r'\