Common Linux commands-file search command find, common linux commands
Command name: find
Command path:/bin/find
Syntax: find [search range] [matching condition]
Function Description: file search
Example
Find/etc-name init
Find the file init In the/etc directory
-Iname is case insensitive.
* Represents a wildcard? Represents a character
Find/-size + 204800
Search for files larger than MB in the root directory
+ N greater than-n Less than n equal
Find/home-user shenchao
In the home directory, find the file whose owner is shenchao.
-Group: search by group
Find/etc-cmin-5
Search for the files and directories of attributes modified within 5 minutes under/etc.
-Amin access time
-Cmin file attribute change
-Modify the mmin File Content
Find/etc-size + 163840-a-size-204800
Search for files larger than 80 MB and smaller than MB in etc
-A: both conditions are met.
-O: only one sub-database can be connected to one sub-database.
Find/etc-name init-exec ls-l {}\;
Search for the init file ice under etc to display its details
-Exec/-OK command {}\; perform operations on search results
-Type: search by file type
F File d directory l soft connection file
-Inum search by I Node