One, the script file query:
1, command format: which [-a] command; <== is found through path.
-A: Lists all, not only the first.
Example: which ifconfig;
Note: Because different user paths are different, there may be differences in the results.
Second, the name of the search:
1, Whereis [-BMSU] file or directory name <== through the database to find, so different users find the results are consistent.
Parameter description:
-B: Only files in binary format are found.
-M: Only files found under the manual path of the description file.
-S: Only source files are found.
-U: A file other than the above three conditions.
2, locate:<== through the database to find, so different users find the results are consistent. It's/var/lib/mlocate.
Locate [-ir] keyword
Parameter description:
-I: Ignores case differences.
-R: The following can be a regular expression.
3, UpdateDB command will refresh the above mentioned database, but it is time-consuming.
4. Find [PATH] [option] [action]
A, time-related parameters:-atime\-actime\-mtime
-mtime files that have been changed within 24 hours of the N-day period.
-mtime files that have been changed before +n:n days (not included).
-mtime-n:n within days (including) files that have been changed.
Example: Find/mtime 0;
B, parameters related to the user or user group:
-uid N: Follow-up instructions.
-gid N: Follow-up instructions.
-user name: such as Vbird.
-group name: such as users.
-nouser: The user's file does not exist.
-nogroup: The file for the user group does not exist.
C. Parameters related to file permissions and names:
-name FileName: Finds the file named filename.
-size [-+] Size: Files larger or smaller than size, such as-size +50k
-type type: Find by file type, f\b\c\d\l\s\p ...
-perm mode: Find files with file permissions just equal to mode.
-perm-mode: Attributes are all included.
-perm +mode: A file that contains any of the mode permissions.