find
The command can find the specified file or directory according to the given path and expression.
-name
: Search for files by file name.
-perm
: Find files according to file permissions.
-user
: Search files according to the file owner.
-group
: Find files according to the group they belong to.
-mtime -n /+n
: Find files according to their modification time. - n
: Indicates that the file change time is within n days from now. + n
: Indicates that the file change time is n days ago from now.
-type
: Find a certain type of file, including the following types.
b: block device file
d: directory
c: character device file
p: pipe file
l: symbolic link file
f: ordinary file.
-size n
: Find files matching the specified file size, replace n with the file capacity.
-exec command {}\;
: Execute the command operation on the matched file, note that there is a space between { } and \;, and {} represents the found content.
This article is a study note for Day 5 in August, and the content comes from Geek Time "100 Lectures on Linux Practical Skills" .