Locate
Non-real-time fuzzy query file, according to the whole system file database query.
Using the UpdateDB command to manually generate a file database is time-consuming.
Find
A real-time, accurate query of files, which is slower by traversing all files in the specified directory to complete lookups. Support for many search criteria.
Find Find Path Lookup criteria finds a later processing action
The lookup path defaults to the current directory, and the lookup criteria default to all files under the specified path, and the processing action is displayed by default.
-name ' FileName ': Exact match according to the file's masterpiece. Supports file name wildcard.
-iname ' filename ': matches by file name. File names match when they are not case-sensitive.
-regex Pattern: Implements file lookups based on patterns.
-user USERNAME: Based on the file belongs to the main implementation file lookup.
-group GROUPNAME: Implement file Lookup According to the file genus Group.
-uid UID: Based on UID lookup.
After the user deletes, the owner of the file to which it belongs is changed to the UID of the user.
-gid GID: Search by GID.
-nouser: Find files that are not owned by the master.
-nogroup: Finds files that do not belong to a group.
-type: Search by file type.
F: Normal file.
D: Directory.
C: Character device file.
B: Block device files.
L: Link file.
S: Socket file.
P: Pipeline file.
-size: Finds files based on file size.
[+|-] #k.
[+|-] #M.
[+|-] #G.
-mtime days: Find files based on modified time.
+: The number of days before the file has been accessed.
-: The file has been accessed within the number of days.
Days: Files have been accessed in just a few days.
-ctime days: Find files based on change time.
-atime days: Find files based on access time.
-mmin minutes:
-cmin minutes:
-amin minutes:
-perm Permission information:
Mode: Exact match.
-mode: Every bit must match. Only file permissions can be matched if this mode is fully contained.
/mode: As long as there is one permission match.
Combination condition: Default to Logical
-A: With.
-O: Or.
-not: Non-.
Action:
-print: Display.
-ls: Displays detailed information for each file in a form similar to ls-l.
-ok COMMAND {} \;: Performs the appropriate action on the queried file. User confirmation is required for each operation.
-exec COMMAND {} \;: Performs the appropriate action on the queried file. No user confirmation is required.
| Xargs COMMAND:
Linux bash-File Lookup