find: traversing its subdirectories recursively from the specified directory, the file or directory to meet the conditions shown in the terminal
The basic syntax: find search options
Options:
- -name: by name
- -user: by user name
- -size: by size, find -size + 20M (greater than 20M), find -size -20M (less than 20M), M uppercase, k lowercase
locate: to quickly locate the file path. locate instructions advantage of all locate the database file name and path of the previously established system of rapid positioning of a given file. locate command without having to traverse the entire file system, query speed, in order to ensure the accuracy of the results, the administrator needs to be updated regularly locate time.
The basic syntax: locate file search
As a result of inquiries locate command based on a database, so the first time you run it, you must create a database using locate updatedb command.
Enough authority to use sudo updatedb
grep and |: grep filtering lookup, pipe symbol "|" represents the transfer processing of the output of the previous command to the command processing later.
The basic syntax: grep option to find content source file
Options:
- -n: display the line number and matching lines
- -i: the capitalization