📄 find.1
字号:
.TH FIND 1.SH NAMEfind \- find files meeting a given condition.SH SYNOPSIS\fBfind \fIdirectory \fIexpression\fR.br.de FL.TP\\fB\\$1\\fR\\$2...de EX.TP 20\\fB\\$1\\fR# \\$2...SH EXAMPLES.EX "find / \-name a.out \-print " "Print all \fIa.out\fR paths".EX "find /usr/ast ! \-newer f \-ok rm {} \\\\\^; " "Ask before removing".EX "find /usr \-size +20 \-exec mv {} /big \\\\\^; " "move files > 20 blks".EX "find / \( \-name a.out \-o \-name \(fm*.o\(fm \) \-exec rm {}\\\\\^;" "2 conds".SH DESCRIPTION.PP\fIFind\fR descends the file tree starting at the given directory checkingeach file in that directory and its subdirectories against a predicate.If the predicate is true, an action is taken. The predicates may beconnected by \fB\-a\fR (Boolean and), \fB\-o\fR (Boolean or) and !(Boolean negation).Each predicate is true under the conditions specified below. The integer \fIn\fR may also be +\fIn\fR to mean any value greater than \fIn\fR, \fI\-n\fR to mean any value less than\fIn\fR, or just \fIn\fR for exactly \fIn\fR..PP.ta 0.25i 1.0i.nf \-name s true if current filename is \fIs\fR (include shell wild cards) \-size n true if file size is \fIn\fR blocks \-inum n true if the current file's i-node number is \fIn\fR \-mtime n true if modification time relative to today (in days) is \fIn\fR \-links n true if the number of links to the file is \fIn\fR \-newer f true if the file is newer than \fIf\fR \-perm n true if the file's permission bits = \fIn\fR (\fIn\fR is in octal) \-user u true if the uid = \fIu\fR (a numerical value, not a login name) \-group g true if the gid = \fIg\fR (a numerical value, not a group name) \-type x where \fIx\fR is \fBbcdfug\fR (block, char, dir, regular file, setuid, setgid) \-xdev do not cross devices to search mounted file systems.fi.PPFollowing the expression can be one of the following, telling what to dowhen a file is found:.PP.nf \-print print the file name on standard output \-exec execute a \s-2MINIX\s0 command, {} stands for the file name \-ok prompts before executing the command.fi.SH "SEE ALSO".BR test (1),.BR xargs (1).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -