File Search command: Find
Syntax: Find search scope match criteria
1. Find name by file name
For example: Find/etc-name init * matches all characters and? Match single character for flexible application
Find/etc-iname file names are case-insensitive when searching
2. Find size according to file size
For example: Find the directory to search for-size + file size (file size is represented by data block)
(In Linux, a data block is 512 bytes, 0.5K) 100mb=102400kb=204800 data block size
3. Search by file Owner
Example: Find/home-user Zhangsan
4. Search by file time attribute
For example: Find/etc-amin + 5 look for files or directories in the/etc directory that have been modified in 5 minutes
-cmin file properties are modified
-mmin file contents are modified
5. Compound Query
For example: Find/etc-size +102400-a-size-204800 Find files in/etc directory (greater than +) 50MB (102400) and-a (and meaning) (less than-) 100MB (204800)
-a means that two conditions are met
-O means two as long as one is satisfied
6. Search by File type
For example: Find-type f means file D means directory L link
7. Operation of search results
For example: Find/etc-name inittab-exec ls-l {} \; Perform ls-l operations on search results for find
-ok
8, according to I-node number search
Example: Find directory-inum i node number
Linux common commands (v)