📄 find.1
字号:
.TH FIND 1 .SH NAMEfind \- find files.SH SYNOPSIS.B findpathname-list expression.SH DESCRIPTION.I Findrecursively descendsthe directory hierarchy foreach pathname in the.I pathname-list(i.e., one or more pathnames)seeking files that match a boolean.I expressionwritten in the primaries given below.In the descriptions, the argument.I nis used as a decimal integerwhere.I +nmeans more than.I n,.I \-nmeans less than.I nand.I nmeans exactly.IR n ..TP 10n.BR \-name " filename"True if the.I filenameargument matches the current file name.NormalShellargument syntax may be used if escaped (watch out for`[', `?' and `*')..TP.BR \-perm " onum"True if the file permission flagsexactlymatch theoctal number.I onum(see.IR chmod (1)).If.I onumis prefixed by a minus sign,more flag bits (017777, see.IR stat (2))become significant andthe flags are compared:.IR (flags&onum)==onum ..TP.BR \-type " c"True if the type of the fileis.I c,where.I cis.B "b, c, d"or.B fforblock special file, character special file,directory or plain file..TP.BR \-links " n"True if the file has.I nlinks..TP.BR \-user " uname"True if the file belongs to the user.I uname(login name or numeric user ID)..TP.BR \-group " gname"True if the file belongs to group.I gname(group name or numeric group ID)..TP.BR \-size " n"True if the file is.I nblocks long (512 bytes per block)..TP.BR \-inum " n"True if the file has inode number.I n..TP.BR \-atime " n"True if the file has been accessed in.I ndays..TP.BR \-mtime " n"True if the file has been modified in.I ndays..TP.BR \-exec " command"True if the executed command returnsa zero value as exit status.The end of the command must be punctuated by an escapedsemicolon.A command argument `{}' is replaced by thecurrent pathname..TP.BR \-ok " command"Like.B \-execexcept that the generated command is written onthe standard output, then the standard input is readand the command executed only upon response.BR y ..TP.B \-printAlways true;causes the current pathname to be printed..TP.BR \-newer " file"True ifthe current file has been modified more recently than the argument.I file..PPThe primaries may be combined using the following operators(in order of decreasing precedence):.TP 41)A parenthesized group of primaries and operators(parentheses are special to the Shell and must be escaped)..TP 42)The negation of a primary(`!' is the unary.I notoperator)..TP 43)Concatenation of primaries(the.I andoperationis implied by the juxtaposition of two primaries)..TP 44)Alternation of primaries.RB "(`" \-o "' is the".I oroperator)..SH EXAMPLETo remove all files named`a.out' or `*.o' that have not been accessed for a week:.IP "" .2ifind / \\( \-name a.out \-o \-name '*.o' \\)\-atime +7 \-exec rm {} \\;.SH FILES/etc/passwd.br/etc/group.SH "SEE ALSO"sh(1), test(1), filsys(5).SH BUGSThe syntax is painful.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -