diff options
Diffstat (limited to 'usr/src/man/man1/find.1')
| -rw-r--r-- | usr/src/man/man1/find.1 | 145 |
1 files changed, 10 insertions, 135 deletions
diff --git a/usr/src/man/man1/find.1 b/usr/src/man/man1/find.1 index 29185df519..ef993a3bbd 100644 --- a/usr/src/man/man1/find.1 +++ b/usr/src/man/man1/find.1 @@ -6,7 +6,7 @@ .\" .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for .\" permission to reproduce portions of its copyrighted documentation. -.\" Original documentation from The Open Group can be obtained online at +.\" Original documentation from The Open Group can be obtained online at .\" http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, .\" have given us permission to reprint portions of their documentation. @@ -33,7 +33,7 @@ .\" add the following below this CDDL HEADER, with the fields enclosed by .\" brackets "[]" replaced with your own identifying information: .\" Portions Copyright [yyyy] [name of copyright owner] -.TH find 1 "5 Sep 2011" "SunOS 5.11" "User Commands" +.TH FIND 1 "Sep 5, 2011" .SH NAME find \- find files .SH SYNOPSIS @@ -68,24 +68,20 @@ directory that is an ancestor of the last file encountered. The following options are supported: .sp .ne 2 -.mk .na \fB\fB-E\fR\fR .ad .RS 6n -.rt Interpret regular expressions followed by \fB-regex\fR and \fB-iregex\fR primaries as extended regular expressions. .RE .sp .ne 2 -.mk .na \fB\fB-H\fR\fR .ad .RS 6n -.rt Causes the file information and file type evaluated for each symbolic link encountered on the command line to be those of the file referenced by the link, and not the link itself. If the referenced file does not exist, the file @@ -95,12 +91,10 @@ links not on the command line is that of the link itself. .sp .ne 2 -.mk .na \fB\fB-L\fR\fR .ad .RS 6n -.rt Causes the file information and file type evaluated for each symbolic link to be those of the file referenced by the link, and not the link itself. See \fBNOTES\fR. @@ -117,23 +111,19 @@ behavior of the utility. The following operands are supported: .sp .ne 2 -.mk .na \fB\fIpath\fR\fR .ad .RS 14n -.rt A pathname of a starting point in the directory hierarchy. .RE .sp .ne 2 -.mk .na \fB\fIexpression\fR\fR .ad .RS 14n -.rt The first argument that starts with a \fB\(mi\fR, or is a \fB!\fR or a \fB(\fR, and all subsequent arguments are interpreted as an \fIexpression\fR made up of the following primaries and operators. In the descriptions, wherever \fIn\fR is @@ -141,34 +131,28 @@ used as a primary argument, it is interpreted as a decimal integer optionally preceded by a plus (\fB+\fR) or minus (\fB\(mi\fR) sign, as follows: .sp .ne 2 -.mk .na \fB+\fIn\fR\fR .ad .RS 6n -.rt more than \fIn\fR .RE .sp .ne 2 -.mk .na \fB\fIn\fR\fR .ad .RS 6n -.rt exactly \fIn\fR .RE .sp .ne 2 -.mk .na \fB-\fIn\fR\fR .ad .RS 6n -.rt less than \fIn\fR .RE @@ -180,80 +164,66 @@ less than \fIn\fR Valid expressions are: .sp .ne 2 -.mk .na \fB\fB-acl\fR\fR .ad .RS 17n -.rt True if the file have additional ACLs defined. .RE .sp .ne 2 -.mk .na \fB\fB-amin\fR \fIn\fR\fR .ad .RS 17n -.rt File was last accessed \fIn\fR minutes ago. .RE .sp .ne 2 -.mk .na \fB\fB-atime\fR \fIn\fR\fR .ad .RS 17n -.rt True if the file was accessed \fIn\fR days ago. The access time of directories in \fIpath\fR is changed by \fBfind\fR itself. .RE .sp .ne 2 -.mk .na \fB\fB-cmin\fR \fIn\fR\fR .ad .RS 17n -.rt File's status was last changed \fIn\fR minutes ago. .RE .sp .ne 2 -.mk .na \fB\fB-cpio\fR \fIdevice\fR\fR .ad .RS 17n -.rt Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR format (5120-byte records). .RE .sp .ne 2 -.mk .na \fB\fB-ctime\fR \fIn\fR\fR .ad .RS 17n -.rt True if the file's status was changed \fIn\fR days ago. .RE .sp .ne 2 -.mk .na \fB\fB-depth\fR\fR .ad .RS 17n -.rt Always true. Causes descent of the directory hierarchy to be done so that all entries in a directory are acted on before the directory itself. This can be useful when \fBfind\fR is used with \fBcpio\fR(1) to transfer files that are @@ -262,12 +232,10 @@ contained in directories without write permission. .sp .ne 2 -.mk .na \fB\fB-exec\fR \fIcommand\fR\fR .ad .RS 17n -.rt True if the executed command returns a zero value as exit status. The end of command must be punctuated by an escaped semicolon (\fB;\fR). A command argument \fB{}\fR is replaced by the current pathname. If the last argument to @@ -279,12 +247,10 @@ status, find returns a non-zero exit status. .sp .ne 2 -.mk .na \fB\fB-follow\fR\fR .ad .RS 17n -.rt Always true and always evaluated no matter where it appears in \fIexpression\fR. The behavior is unspecified if \fB-follow\fR is used when the \fBfind\fR command is invoked with either the \fB-H\fR or the \fB-L\fR option. @@ -297,35 +263,29 @@ This expression should not be used with the find-type \fBl\fR expression. See .sp .ne 2 -.mk .na \fB\fB-fstype\fR \fItype\fR\fR .ad .RS 17n -.rt True if the filesystem to which the file belongs is of type \fItype\fR. .RE .sp .ne 2 -.mk .na \fB\fB-group\fR \fIgname\fR\fR .ad .RS 17n -.rt True if the file belongs to the group \fIgname\fR. If \fIgname\fR is numeric and there's no such group name, it is taken as a group \fBID\fR. .RE .sp .ne 2 -.mk .na \fB\fB-groupacl\fR \fIgname\fR\fR .ad .RS 17n -.rt True if the file's ACL contains an entry for the group \fIgname\fR. If \fIgname\fR is numeric and there's no such group name, it is taken as a group \fBID\fR. @@ -333,56 +293,46 @@ as a group \fBID\fR. .sp .ne 2 -.mk .na \fB\fB-iname\fR \fIpattern\fR\fR .ad .RS 17n -.rt Like \fB-name\fR, but the match is case insensitive. .RE .sp .ne 2 -.mk .na \fB\fB-inum\fR \fIn\fR\fR .ad .RS 17n -.rt True if the file has inode number \fIn\fR. .RE .sp .ne 2 -.mk .na \fB\fB-iregex\fR \fIpattern\fR\fR .ad .RS 17n -.rt Like \fB-regex\fR, but the match is case insensitive. .RE .sp .ne 2 -.mk .na \fB\fB-links\fR \fIn\fR\fR .ad .RS 17n -.rt True if the file has \fIn\fR links. .RE .sp .ne 2 -.mk .na \fB\fB-local\fR\fR .ad .RS 17n -.rt True if the file system type is not a remote file system type as defined in the \fB/etc/dfs/fstypes\fR file. \fBnfs\fR is used as the default remote filesystem type if the \fB/etc/dfs/fstypes\fR file is not present. The \fB-local\fR option @@ -392,12 +342,10 @@ example of how to search for local files without descending. .sp .ne 2 -.mk .na \fB\fB-ls\fR\fR .ad .RS 17n -.rt Always true. Prints current pathname together with its associated statistics. These include (respectively): .RS +4 @@ -460,12 +408,10 @@ Formatting is done internally, without executing the \fBls\fR program. .sp .ne 2 -.mk .na \fB\fB-maxdepth\fR \fIn\fR\fR .ad .RS 17n -.rt Always true; descend at most \fIn\fR directory levels below the command line arguments. If any \fB-maxdepth\fR primary is specified, it applies to the entire expression even if it would not normally be @@ -475,12 +421,10 @@ the command line arguments. .sp .ne 2 -.mk .na \fB\fB-mindepth\fR \fIn\fR\fR .ad .RS 17n -.rt Always true; do not apply any tests or actions at levels less than \fIn\fR. If any \fB-mindepth\fR primary is specified, it applies to the entire expression even if it would not normally be evaluated. @@ -489,46 +433,38 @@ entire expression even if it would not normally be evaluated. .sp .ne 2 -.mk .na \fB\fB-mmin\fR \fIn\fR\fR .ad .RS 17n -.rt File's data was last modified \fIn\fR minutes ago. .RE .sp .ne 2 -.mk .na \fB\fB-mount\fR\fR .ad .RS 17n -.rt Always true. Restricts the search to the file system containing the directory specified. Does not list mount points to other file systems. .RE .sp .ne 2 -.mk .na \fB\fB-mtime\fR \fIn\fR\fR .ad .RS 17n -.rt True if the file's data was modified \fIn\fR days ago. .RE .sp .ne 2 -.mk .na \fB\fB-name\fR \fIpattern\fR\fR .ad .RS 17n -.rt True if \fIpattern\fR matches the basename of the current file name. Normal shell file name generation characters (see \fBsh\fR(1)) can be used. A backslash (\fB\|\e\|\fR) is used as an escape character within the pattern. The @@ -543,104 +479,86 @@ names beginning with '\fB\&.\fR'. .sp .ne 2 -.mk .na \fB\fB-ncpio\fR \fIdevice\fR\fR .ad .RS 17n -.rt Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR \fB-c\fR format (5120 byte records). .RE .sp .ne 2 -.mk .na \fB\fB-newer\fR \fIfile\fR\fR .ad .RS 17n -.rt True if the current file has been modified more recently than the argument \fIfile\fR. .RE .sp .ne 2 -.mk .na \fB\fB-nogroup\fR\fR .ad .RS 17n -.rt True if the file belongs to non-existing group. .RE .sp .ne 2 -.mk .na \fB\fB-nouser\fR\fR .ad .RS 17n -.rt True if the file belongs to non-existing user. .RE .sp .ne 2 -.mk .na \fB\fB-ok\fR \fIcommand\fR\fR .ad .RS 17n -.rt Like \fB-exec\fR, except that the generated command line is printed with a question mark first, and is executed only if the response is affirmative. .RE .sp .ne 2 -.mk .na \fB\fB-perm\fR [\fB-\fR]\fImode\fR\fR .ad .RS 17n -.rt The \fImode\fR argument is used to represent file mode bits. It is identical in format to the symbolic mode operand, \fIsymbolic_mode_list\fR, described in \fBchmod\fR(1), and is interpreted as follows. To start, a template is assumed with all file mode bits cleared. An \fIop\fR symbol of: .sp .ne 2 -.mk .na \fB\fB+\fR\fR .ad .RS 8n -.rt Set the appropriate mode bits in the template .RE .sp .ne 2 -.mk .na \fB\fB\(mi\fR\fR .ad .RS 8n -.rt Clear the appropriate bits .RE .sp .ne 2 -.mk .na \fB\fB=\fR\fR .ad .RS 8n -.rt Set the appropriate mode bits, without regard to the contents of the file mode creation mask of the process .RE @@ -660,12 +578,10 @@ permission bits. .sp .ne 2 -.mk .na \fB\fB-perm\fR [\fB-\fR]\fIonum\fR\fR .ad .RS 17n -.rt True if the file permission flags exactly match the octal number \fIonum\fR (see \fBchmod\fR(1)). If \fIonum\fR is prefixed by a minus sign (\fB\(mi\fR), only the bits that are set in \fIonum\fR are compared with the file permission @@ -674,35 +590,29 @@ flags, and the expression evaluates true if they match. .sp .ne 2 -.mk .na \fB\fB-print\fR\fR .ad .RS 17n -.rt Always true. Causes the current pathname to be printed. .RE .sp .ne 2 -.mk .na \fB\fB-print0\fR\fR .ad .RS 17n -.rt Always true. Causes the current pathname to be printed, terminated by an ASCII NUL character (character code 0) instead of a newline. .RE .sp .ne 2 -.mk .na \fB\fB-prune\fR\fR .ad .RS 17n -.rt Always yields true. Does not examine any directories or files in the directory structure below the \fIpattern\fR just matched. (See EXAMPLES). If \fB-depth\fR is specified, \fB-prune\fR has no effect. @@ -710,36 +620,30 @@ is specified, \fB-prune\fR has no effect. .sp .ne 2 -.mk .na \fB\fB-regex\fR \fIpattern\fR\fB .ad .RS 17n -.rt True if the full path of the file matches \fIpattern\fR using regular expressions. .RE .sp .ne 2 -.mk .na \fB\fB-size\fR \fIn\fR[\fBc\fR]\fR .ad .RS 17n -.rt True if the file is \fIn\fR blocks long (512 bytes per block). If \fIn\fR is followed by a \fBc\fR, the size is in bytes. .RE .sp .ne 2 -.mk .na \fB\fB-type\fR \fIc\fR\fR .ad .RS 17n -.rt True if the type of the file is \fIc\fR, where \fIc\fR is \fBb\fR, \fBc\fR, \fBd\fR, \fBD\fR, \fBf\fR, \fBl\fR, \fBp\fR, or \fBs\fR for block special file, character special file, directory, door, plain file, symbolic link, fifo (named @@ -748,24 +652,20 @@ pipe), or socket, respectively. .sp .ne 2 -.mk .na \fB\fB-user\fR \fIuname\fR\fR .ad .RS 17n -.rt True if the file belongs to the user \fIuname\fR. If \fIuname\fR is numeric and there's no such user name, it is taken as a user \fBID\fR. .RE .sp .ne 2 -.mk .na \fB\fB-useracl\fR \fIuname\fR\fR .ad .RS 17n -.rt True if the file's ACL contains an entry for the user \fIuname\fR. If \fIuname\fR is numeric and there's no such user name, it is taken as a user \fBID\fR. @@ -773,23 +673,19 @@ taken as a user \fBID\fR. .sp .ne 2 -.mk .na \fB\fB-xdev\fR\fR .ad .RS 17n -.rt Same as the \fB-mount\fR primary. .RE .sp .ne 2 -.mk .na \fB\fB-xattr\fR\fR .ad .RS 17n -.rt True if the file has extended attributes. .RE @@ -800,7 +696,6 @@ The primaries can be combined using the following operators (in order of decreasing precedence): .sp .ne 2 -.mk .na \fB1)\fB(\fR\fIexpression\fR\fB)\fR\fR .ad @@ -812,7 +707,6 @@ shell and must be escaped). .sp .ne 2 -.mk .na \fB2)\fB!\fR\fIexpression\fR\fR .ad @@ -823,7 +717,6 @@ The negation of a primary (\fB!\fR is the unary \fInot\fR operator). .sp .ne 2 -.mk .na \fB3) \fIexpression\fR\fB[\fR\fB-a\fR\fB]\fR \fIexpression\fR\fR .ad @@ -835,7 +728,6 @@ juxtaposition of two primaries). .sp .ne 2 -.mk .na \fB4) \fIexpression\fR\fB\fR\fB-o\fR\fIexpression\fR\fR .ad @@ -900,7 +792,7 @@ or \fB*.o\fR that have not been accessed for a week: .in +2 .nf example% \fBfind $HOME \e( -name a.out -o -name '*.o' \e) \e - -atime +7 -exec rm {} \e;\fR + -atime +7 -exec rm {} \e;\fR .fi .in -2 .sp @@ -1047,12 +939,10 @@ that affect the execution of \fBfind\fR: \fBLANG\fR, \fBLC_ALL\fR, \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR. .sp .ne 2 -.mk .na \fB\fBPATH\fR\fR .ad .RS 8n -.rt Determine the location of the \fIutility_name\fR for the \fB-exec\fR and \fB-ok\fR primaries. .RE @@ -1073,57 +963,47 @@ expression defined for the \fByesexpr\fR. See \fBlocale\fR(5). The following exit values are returned: .sp .ne 2 -.mk .na \fB\fB0\fR\fR .ad .RS 6n -.rt All \fIpath\fR operands were traversed successfully. .RE .sp .ne 2 -.mk .na \fB\fB>0\fR\fR .ad .RS 6n -.rt An error occurred. .RE .SH FILES .sp .ne 2 -.mk .na \fB\fB/etc/passwd\fR\fR .ad .RS 20n -.rt Password file .RE .sp .ne 2 -.mk .na \fB\fB/etc/group\fR\fR .ad .RS 20n -.rt Group file .RE .sp .ne 2 -.mk .na \fB\fB/etc/dfs/fstypes\fR\fR .ad .RS 20n -.rt File that registers distributed file system packages .RE @@ -1135,17 +1015,16 @@ See \fBattributes\fR(5) for descriptions of the following attributes: .sp .TS -tab() box; -cw(2.75i) |cw(2.75i) -lw(2.75i) |lw(2.75i) -. -ATTRIBUTE TYPEATTRIBUTE VALUE +box; +c | c +l | l . +ATTRIBUTE TYPE ATTRIBUTE VALUE _ -CSIEnabled +CSI Enabled _ -Interface StabilityCommitted +Interface Stability Committed _ -StandardSee \fBstandards\fR(5). +Standard See \fBstandards\fR(5). .TE .SH SEE ALSO @@ -1162,24 +1041,20 @@ The following options are obsolete and will not be supported in future releases: .sp .ne 2 -.mk .na \fB\fB-cpio\fR \fIdevice\fR\fR .ad .RS 17n -.rt Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR format (5120-byte records). .RE .sp .ne 2 -.mk .na \fB\fB-ncpio\fR \fIdevice\fR\fR .ad .RS 17n -.rt Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR \fB-c\fR format (5120-byte records). .RE |
