⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 find.1

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 1
字号:
.\" SCCSID: @(#)find.1	2.3	6/8/87.TH find 1 .SH Namefind \- find files.SH Syntax.B find\fIpathname-list  expression\fR.SH Description.NXR "find command".NXR "file" "finding".NXA "find command" "test command"The.PN findcommand recursively descendsthe directory hierarchy foreach pathname in the.I pathname-list(that is, 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 n ,and.I nmeans exactly.IR n ..SH Options.IP "\fB\-atime\fI n\fR" 15Tests true if the file has been accessed in.I ndays..IP "\fB\-cpio\fR \fIoutput\fR" 15Writes current file on.I outputin the format (5120-byte records) specified in the.MS cpio 5reference page.  The.I output can be either a file or tape device.  If .I output is a tape device the .PN cpioB key must be used to read data from the tape..IP "\fB\-ctime\fI n\fR" 15Tests true if the file has been changed in.I ndays..IP "\fB\-depth\fR" 15Always true;causes descent of the directory hierarchy to be doneso that all entries in a directory are acted on before the directory itself (that is, postorder instead of preorder).This can be useful when.PN findis used with.PN cpioto transfer filesthat are contained in directories withoutwrite permission..IP "\fB\-exec\fR command" 15Tests true if specified command returns a 0 on exit.  The end of the command must be punctuated by an escapedsemicolon.A command argument `{}' is replaced by thecurrent pathname..IP "\fB\-group\fR gname" 15Tests true if group ID matches specified group name.  .IP "\fB\-inum\fI n\fR" 15Tests true if the file has inode number.I n..IP "\fB\-links\fI n\fR" 15Tests true if the file has.I nlinks..IP \fB\-mount\fR 15Tests true ifthe current file is on the same file system as the current starting pathname..IP "\fB\-mtime\fI n\fR" 15Tests true if the file has been modified in.I ndays..IP "\fB\-name\fR filename" 15Tests true if the.I filenameargument matches the current file name.NormalShellargument syntax may be used if escaped (watch out for`[', `?' and `*')..IP "\fB\-newer\fR file" 15Tests true ifthe current file has been modified more recently than the argument \fIfile\fR..IP "\fB\-ok\fR command" 15Executes specified command onstandard output, then standard inputis read and command executed onlyupon response .B y.  .IP "\fB\-perm\fR onum" 15Tests true if file has specified octal number.  For further information, see .MS chmod 1 .If.I onumis prefixed by a minus sign,more flag bits (017777)become significant andthe flags are compared:.IR (flags&onum)==onum .For further information, see .MS stat 2 ..IP \fB\-print\fR 15Prints current pathname. .IP "\fB\-size\fI n\fR" 15Tests true if the file is.I nblocks long (512 bytes per block)..IP "\fB\-type\fI c\fR" 15Tests true if fileis.I ctype (.I c=.B b,block special file:.B c,character special file:.B d,directory:.B f,plain file:.B l,symbolic link:.B p,type port:.B s,type socket). .IP "\fB\-user\fR uname" 15Tests true if file owner is login name or numeric user ID.  .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 ExamplesTo remove all files named`a.out' or `*.o' that have not been accessed for a week:.EXfind / \\( \-name a.out \-o \-name '*.o' \\) \\\-atime +7 \-exec rm {} \\;.EE.PPTo find all files on the root file system type:.EXfind / \-mount \-print.EE.PPTo write all the files on the root file system to tape:.EXfind / \-mount \-print \-cpio /dev/rmt?hcpio \-iBvt < /dev/rmt?h.EE.PPTo find all the mount points on the root file system type:.EXfind / ! \-mount \-print.EE.SH Files.PN /etc/passwd.br.PN /etc/group.SH See Alsocpio(1), sh(1), test(1), cpio(5), fs(5)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -