command: Find
Find, search
With the characteristics of immediacy, do not need the database, relatively slower
1. Search for files recursively down from the specified path
2. Support Search by various conditions
3, support the search to obtain the file further with the instructions
Syntax: # Find [path] [parameter] [expression]
Common parameters
-user can find files based on file owner # find/root-user Root Find the file owner is root in the root directory
-group find files based on the file's owning group # Find/root-group Root Find the file that belongs to the group root under the/root folder
-nouser find files without file owners, such as some Trojans, but be aware that some Linux system files do not already have users # Find/etc-nouser
-nogroup find a file without a group, the same principle as-nouser # Find/etc-nogroup
-name Search by file name # find/ect-name Services Find a file with the name service under etc
-size Find files based on file size # Find/etc-size +1000k find files larger than 1M
-type to find files based on the type of file. General file with F, character C, block file B, directory D, Link L # find/root-type F Find File type as generic file
-atime +n accesses or executes files that are longer than n days
-ctime +n Write, change the Inode property (change owner, permission, or connection, etc.) file-mtime +n write time greater than n days
-exec outputs the results of the find lookup to the following instruction as input. Like what. # Find./-mtime +10-exec RM-RF {} \; Find files in the current directory that have been created for more than 10 days and delete This command also replaces {} as a file in the previous find, followed by "\" for ";" , or the shell will use the semicolon as the end of the line command.
-perm Find files based on file permissions # Find/home-perm 600 files found with permission, hidden files are also displayed
Linux instructions detailed Find search