.\"
.\" 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
.\" 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.
.\"
.\" In the following statement, the phrase ``this text'' refers to portions
.\" of the system documentation.
.\"
.\" Portions of this text are reprinted and reproduced in electronic form
.\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
.\" Standard for Information Technology -- Portable Operating System
.\" Interface (POSIX), The Open Group Base Specifications Issue 6,
.\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
.\" Engineers, Inc and The Open Group.  In the event of any discrepancy
.\" between these versions and the original IEEE and The Open Group
.\" Standard, the original IEEE and The Open Group Standard is the referee
.\" document.  The original Standard can be obtained online at
.\" http://www.opengroup.org/unix/online.html.
.\"
.\" This notice shall appear on any product containing this material.
.\"
.\" The contents of this file are subject to the terms of the
.\" Common Development and Distribution License (the "License").
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
.\" or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
.\" When distributing Covered Code, include this CDDL HEADER in each
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
.\" If applicable, 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]
.\"
.\"
.\" Copyright 1989 AT&T
.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
.\" Copyright 2011 Nexenta Systems, Inc. All rights reserved.
.\" Copyright (c) 2013 Andrew Stormont.  All rights reserved.
.\"
.TH FIND 1 "Sep 5, 2011"
.SH NAME
find \- find files
.SH SYNOPSIS
.LP
.nf
\fB/usr/bin/find\fR [\fB-E\fR] [\fB-H\fR | \fB-L\fR] \fIpath\fR... \fIexpression\fR
.fi

.LP
.nf
\fB/usr/xpg4/bin/find\fR [\fB-H\fR | \fB-L\fR] \fIpath\fR... \fIexpression\fR
.fi

.SH DESCRIPTION
.LP
The \fBfind\fR utility recursively descends the directory hierarchy for each
\fIpath\fR seeking files that match a Boolean \fIexpression\fR written in the
primaries specified below.
.sp
.LP
\fBfind\fR is able to descend to arbitrary depths in a file hierarchy and does
not fail due to path length limitations (unless a \fIpath\fR operand specified
by the application exceeds \fIPATH_MAX\fR requirements).
.sp
.LP
\fBfind\fR detects infinite loops; that is, entering a previously visited
directory that is an ancestor of the last file encountered.
.SH OPTIONS
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-E\fR\fR
.ad
.RS 6n
Interpret regular expressions followed by \fB-regex\fR and \fB-iregex\fR
primaries as extended regular expressions.
.RE

.sp
.ne 2
.na
\fB\fB-H\fR\fR
.ad
.RS 6n
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
information and type is for the link itself. File information for all symbolic
links not on the command line is that of the link itself.
.RE

.sp
.ne 2
.na
\fB\fB-L\fR\fR
.ad
.RS 6n
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.
.RE

.sp
.LP
Specifying more than one of the mutually-exclusive options \fB-H\fR and
\fB-L\fR is not considered an error. The last option specified determines the
behavior of the utility.
.SH OPERANDS
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIpath\fR\fR
.ad
.RS 14n
A pathname of a starting point in the directory hierarchy.
.RE

.sp
.ne 2
.na
\fB\fIexpression\fR\fR
.ad
.RS 14n
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
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
.na
\fB+\fIn\fR\fR
.ad
.RS 6n
more than \fIn\fR
.RE

.sp
.ne 2
.na
\fB\fIn\fR\fR
.ad
.RS 6n
exactly \fIn\fR
.RE

.sp
.ne 2
.na
\fB-\fIn\fR\fR
.ad
.RS 6n
less than \fIn\fR
.RE

.RE

.SS "Expressions"
.LP
Valid expressions are:
.sp
.ne 2
.na
\fB\fB-acl\fR\fR
.ad
.RS 17n
True if the file have additional ACLs defined.
.RE

.sp
.ne 2
.na
\fB\fB-amin\fR \fIn\fR\fR
.ad
.RS 17n
File was last accessed \fIn\fR minutes ago.
.RE

.sp
.ne 2
.na
\fB\fB-atime\fR \fIn\fR\fR
.ad
.RS 17n
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
.na
\fB\fB-cmin\fR \fIn\fR\fR
.ad
.RS 17n
File's status was last changed \fIn\fR minutes ago.
.RE

.sp
.ne 2
.na
\fB\fB-cpio\fR \fIdevice\fR\fR
.ad
.RS 17n
Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR format
(5120-byte records).
.RE

.sp
.ne 2
.na
\fB\fB-ctime\fR \fIn\fR\fR
.ad
.RS 17n
True if the file's status was changed \fIn\fR days ago.
.RE

.sp
.ne 2
.na
\fB\fB-depth\fR\fR
.ad
.RS 17n
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
contained in directories without write permission.
.RE

.sp
.ne 2
.na
\fB\fB-exec\fR \fIcommand\fR\fR
.ad
.RS 17n
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
\fB-exec\fR is \fB{}\fR and you specify \fB+\fR rather than the semicolon
(\fB;\fR), the command is invoked fewer times, with \fB{}\fR replaced by groups
of pathnames. If any invocation of the command returns a non-zero value as exit
status, find returns a non-zero exit status.
.RE

.sp
.ne 2
.na
\fB\fB-follow\fR\fR
.ad
.RS 17n
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.
Causes symbolic links to be followed. When following symbolic links, \fBfind\fR
keeps track of the directories visited so that it can detect infinite loops.
For example, such a loop would occur if a symbolic link pointed to an ancestor.
This expression should not be used with the find-type \fBl\fR expression. See
\fBNOTES\fR.
.RE

.sp
.ne 2
.na
\fB\fB-fstype\fR \fItype\fR\fR
.ad
.RS 17n
True if the filesystem to which the file belongs is of type \fItype\fR.
.RE

.sp
.ne 2
.na
\fB\fB-group\fR \fIgname\fR\fR
.ad
.RS 17n
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
.na
\fB\fB-groupacl\fR \fIgname\fR\fR
.ad
.RS 17n
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.
.RE

.sp
.ne 2
.na
\fB\fB-iname\fR \fIpattern\fR\fR
.ad
.RS 17n
Like \fB-name\fR, but the match is case insensitive.
.RE

.sp
.ne 2
.na
\fB\fB-inum\fR \fIn\fR\fR
.ad
.RS 17n
True if the file has inode number \fIn\fR.
.RE

.sp
.ne 2
.na
\fB\fB-ipath\fR \fIpattern\fR\fR
.ad
.RS 17n
Like \fB-path\fR, but the match is case insensitive.
.RE

.sp
.ne 2
.na
\fB\fB-iregex\fR \fIpattern\fR\fR
.ad
.RS 17n
Like \fB-regex\fR, but the match is case insensitive.
.RE

.sp
.ne 2
.na
\fB\fB-links\fR \fIn\fR\fR
.ad
.RS 17n
True if the file has \fIn\fR links.
.RE

.sp
.ne 2
.na
\fB\fB-local\fR\fR
.ad
.RS 17n
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
descends the hierarchy of non-local directories. See \fBEXAMPLES\fR for an
example of how to search for local files without descending.
.RE

.sp
.ne 2
.na
\fB\fB-ls\fR\fR
.ad
.RS 17n
Always true. Prints current pathname together with its associated statistics.
These include (respectively):
.RS +4
.TP
.ie t \(bu
.el o
inode number
.RE
.RS +4
.TP
.ie t \(bu
.el o
size in kilobytes (1024 bytes)
.RE
.RS +4
.TP
.ie t \(bu
.el o
protection mode
.RE
.RS +4
.TP
.ie t \(bu
.el o
number of hard links
.RE
.RS +4
.TP
.ie t \(bu
.el o
user
.RE
.RS +4
.TP
.ie t \(bu
.el o
group
.RE
.RS +4
.TP
.ie t \(bu
.el o
size in bytes
.RE
.RS +4
.TP
.ie t \(bu
.el o
modification time.
.RE
If the file is a special file, the size field instead contains the major and
minor device numbers.
.sp
If the file is a symbolic link, the pathname of the linked-to file is printed
preceded by `\fB\(->\fR\&'. The format is identical to that of \fBls\fR
\fB-gilds\fR (see \fBls\fR(1B)).
.sp
Formatting is done internally, without executing the \fBls\fR program.
.RE

.sp
.ne 2
.na
\fB\fB-maxdepth\fR \fIn\fR\fR
.ad
.RS 17n
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
evaluated. \fB-maxdepth 0\fR limits the whole search to
the command line arguments.
.RE

.sp
.ne 2
.na
\fB\fB-mindepth\fR \fIn\fR\fR
.ad
.RS 17n
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.
\fB-mindepth 1\fR processes all but the command line arguments.
.RE

.sp
.ne 2
.na
\fB\fB-mmin\fR \fIn\fR\fR
.ad
.RS 17n
File's data was last modified \fIn\fR minutes ago.
.RE

.sp
.ne 2
.na
\fB\fB-mount\fR\fR
.ad
.RS 17n
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
.na
\fB\fB-mtime\fR \fIn\fR\fR
.ad
.RS 17n
True if the file's data was modified \fIn\fR days ago.
.RE

.sp
.ne 2
.na
\fB\fB-name\fR \fIpattern\fR\fR
.ad
.RS 17n
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
pattern should be escaped or quoted when \fBfind\fR is invoked from the shell.
.sp
Unless the character '\fB\&.\fR' is explicitly specified in the beginning of
\fIpattern\fR, a current file name beginning with '\fB\&.\fR' does not match
\fIpattern\fR when using \fB/usr/bin/find\fR. \fB/usr/xpg4/bin/find\fR does not
make this distinction; wildcard file name generation characters can match file
names beginning with '\fB\&.\fR'.
.RE

.sp
.ne 2
.na
\fB\fB-ncpio\fR \fIdevice\fR\fR
.ad
.RS 17n
Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR \fB-c\fR
format (5120 byte records).
.RE

.sp
.ne 2
.na
\fB\fB-newer\fR \fIfile\fR\fR
.ad
.RS 17n
True if the current file has been modified more recently than the argument
\fIfile\fR.
.RE

.sp
.ne 2
.na
\fB\fB-nogroup\fR\fR
.ad
.RS 17n
True if the file belongs to non-existing group.
.RE

.sp
.ne 2
.na
\fB\fB-nouser\fR\fR
.ad
.RS 17n
True if the file belongs to non-existing user.
.RE

.sp
.ne 2
.na
\fB\fB-ok\fR \fIcommand\fR\fR
.ad
.RS 17n
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
.na
\fB\fB-path\fR\fR
.ad
.RS 17n
Like \fB-name\fR, but matches the entire file path and not just basename.
.RE

.sp
.ne 2
.na
\fB\fB-perm\fR [\fB-\fR]\fImode\fR\fR
.ad
.RS 17n
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
.na
\fB\fB+\fR\fR
.ad
.RS 8n
Set the appropriate mode bits in the template
.RE

.sp
.ne 2
.na
\fB\fB\(mi\fR\fR
.ad
.RS 8n
Clear the appropriate bits
.RE

.sp
.ne 2
.na
\fB\fB=\fR\fR
.ad
.RS 8n
Set the appropriate mode bits, without regard to the contents of the file mode
creation mask of the process
.RE

The \fIop\fR symbol of \fB\(mi\fR cannot be the first character of \fImode\fR,
to avoid ambiguity with the optional leading hyphen. Since the initial mode is
all bits off, there are no symbolic modes that need to use \fB\(mi\fR as the
first character.
.sp
If the hyphen is omitted, the primary evaluates as true when the file
permission bits exactly match the value of the resulting template.
.sp
Otherwise, if \fImode\fR is prefixed by a hyphen, the primary evaluates as true
if at least all the bits in the resulting template are set in the file
permission bits.
.RE

.sp
.ne 2
.na
\fB\fB-perm\fR [\fB-\fR]\fIonum\fR\fR
.ad
.RS 17n
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
flags, and the expression evaluates true if they match.
.RE

.sp
.ne 2
.na
\fB\fB-print\fR\fR
.ad
.RS 17n
Always true. Causes the current pathname to be printed.
.RE

.sp
.ne 2
.na
\fB\fB-print0\fR\fR
.ad
.RS 17n
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
.na
\fB\fB-prune\fR\fR
.ad
.RS 17n
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.
.RE

.sp
.ne 2
.na
\fB\fB-regex\fR \fIpattern\fR\fB
.ad
.RS 17n
True if the full path of the file matches \fIpattern\fR using regular
expressions.
.RE

.sp
.ne 2
.na
\fB\fB-size\fR \fIn\fR[\fBc\fR]\fR
.ad
.RS 17n
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
.na
\fB\fB-type\fR \fIc\fR\fR
.ad
.RS 17n
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
pipe), or socket, respectively.
.RE

.sp
.ne 2
.na
\fB\fB-user\fR \fIuname\fR\fR
.ad
.RS 17n
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
.na
\fB\fB-useracl\fR \fIuname\fR\fR
.ad
.RS 17n
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.
.RE

.sp
.ne 2
.na
\fB\fB-xdev\fR\fR
.ad
.RS 17n
Same as the \fB-mount\fR primary.
.RE

.sp
.ne 2
.na
\fB\fB-xattr\fR\fR
.ad
.RS 17n
True if the file has extended attributes.
.RE

.SS "Complex Expressions"
.LP
The primaries can be combined using the following operators (in order of
decreasing precedence):
.sp
.ne 2
.na
\fB1)\fB(\fR\fIexpression\fR\fB)\fR\fR
.ad
.sp .6
.RS 4n
True if the parenthesized expression is true (parentheses are special to the
shell and must be escaped).
.RE

.sp
.ne 2
.na
\fB2)\fB!\fR\fIexpression\fR\fR
.ad
.sp .6
.RS 4n
The negation of a primary (\fB!\fR is the unary \fInot\fR operator).
.RE

.sp
.ne 2
.na
\fB3) \fIexpression\fR\fB[\fR\fB-a\fR\fB]\fR \fIexpression\fR\fR
.ad
.sp .6
.RS 4n
Concatenation of primaries (the \fIand\fR operation is implied by the
juxtaposition of two primaries).
.RE

.sp
.ne 2
.na
\fB4) \fIexpression\fR\fB\fR\fB-o\fR\fIexpression\fR\fR
.ad
.sp .6
.RS 4n
Alternation of primaries (\fB-o\fR is the \fIor\fR operator).
.RE

.sp
.LP
When you use \fBfind\fR in conjunction with \fBcpio\fR, if you use the \fB-L\fR
option with \fBcpio\fR, you must use the \fB-L\fR option or the \fB-follow\fR
primitive with \fBfind\fR and vice versa. Otherwise the results are
unspecified.
.sp
.LP
If no \fIexpression\fR is present, \fB-print\fR is used as the expression.
Otherwise, if the specified expression does not contain any of the primaries
\fB-exec\fR, \fB-ok\fR, \fB-ls\fR, or \fB-print\fR, the specified expression is
effectively replaced by:
.sp
.LP
(\fIspecified\fR) \fB-print\fR
.sp
.LP
The \fB-user\fR, \fB-group\fR, and \fB-newer\fR primaries each evaluate their
respective arguments only once. Invocation of \fIcommand\fR specified by
\fB-exec\fR or \fB-ok\fR does not affect subsequent primaries on the same file.
.SH USAGE
.LP
See \fBlargefile\fR(5) for the description of the behavior of \fBfind\fR when
encountering files greater than or equal to 2 Gbyte (2^31 bytes).
.SH EXAMPLES
.LP
\fBExample 1 \fRWriting Out the Hierarchy Directory
.sp
.LP
The following commands are equivalent:

.sp
.in +2
.nf
example% \fBfind .\fR
example% \fBfind . -print\fR
.fi
.in -2
.sp

.sp
.LP
They both write out the entire directory hierarchy from the current directory.

.LP
\fBExample 2 \fRRemoving Files
.sp
.LP
The following command removes all files in your home directory named \fBa.out\fR
or \fB*.o\fR that have not been accessed for a week:

.sp
.in +2
.nf
example% \fBfind $HOME \e( -name a.out -o -name '*.o' \e) \e
       -atime +7 -exec rm {} \e;\fR
.fi
.in -2
.sp

.LP
\fBExample 3 \fRPrinting All File Names But Skipping SCCS Directories
.sp
.LP
The following command recursively print all file names in the current directory
and below, but skipping \fBSCCS\fR directories:

.sp
.in +2
.nf
example% \fBfind . -name SCCS -prune -o -print\fR
.fi
.in -2
.sp

.LP
\fBExample 4 \fRPrinting all file names and the SCCS directory name
.sp
.LP
Recursively print all file names in the current directory and below, skipping
the contents of \fBSCCS\fR directories, but printing out the \fBSCCS\fR
directory name:

.sp
.in +2
.nf
example% \fBfind . -print -name SCCS -prune\fR
.fi
.in -2
.sp

.LP
\fBExample 5 \fRTesting for the Newer File
.sp
.LP
The following command is basically equivalent to the \fB-nt\fR extension to
\fBtest\fR(1):

.sp
.in +2
.nf
example$ \fBif [ -n "$(find
file1 -prune -newer file2)" ]; then

printf %s\e\en "file1 is newer than file2"\fR
.fi
.in -2
.sp

.LP
\fBExample 6 \fRSelecting a File Using 24-hour Mode
.sp
.LP
The descriptions of \fB-atime\fR, \fB-ctime\fR, and \fB-mtime\fR use the
terminology \fIn\fR ``24-hour periods''. For example, a file accessed at 23:59
is selected by:

.sp
.in +2
.nf
example% \fBfind . -atime -1 -print\fR
.fi
.in -2
.sp

.sp
.LP
at 00:01 the next day (less than 24 hours later, not more than one day ago).
The midnight boundary between days has no effect on the 24-hour calculation.

.LP
\fBExample 7 \fRPrinting Files Matching a User's Permission Mode
.sp
.LP
The following command recursively print all file names whose permission mode
exactly matches read, write, and execute access for user, and read and execute
access for group and other:

.sp
.in +2
.nf
example% \fBfind . -perm u=rwx,g=rx,o=rx\fR
.fi
.in -2
.sp

.sp
.LP
The above could alternatively be specified as follows:

.sp
.in +2
.nf
example% \fBfind . -perm a=rwx,g-w,o-w\fR
.fi
.in -2
.sp

.LP
\fBExample 8 \fRPrinting Files with Write Access for \fBother\fR
.sp
.LP
The following command recursively print all file names whose permission
includes, but is not limited to, write access for other:

.sp
.in +2
.nf
example% \fBfind . -perm -o+w\fR
.fi
.in -2
.sp

.LP
\fBExample 9 \fRPrinting Local Files without Descending Non-local Directories
.sp
.in +2
.nf
example% \fBfind . ! -local -prune -o -print\fR
.fi
.in -2
.sp

.LP
\fBExample 10 \fRPrinting the Files in the Name Space Possessing Extended
Attributes
.sp
.in +2
.nf
example% \fBfind . -xattr\fR
.fi
.in -2
.sp

.SH ENVIRONMENT VARIABLES
.LP
See \fBenviron\fR(5) for descriptions of the following environment variables
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
.na
\fB\fBPATH\fR\fR
.ad
.RS 8n
Determine the location of the \fIutility_name\fR for the \fB-exec\fR and
\fB-ok\fR primaries.
.RE

.sp
.LP
Affirmative responses are processed using the extended regular expression
defined for the \fByesexpr\fR keyword in the \fBLC_MESSAGES\fR category of the
user's locale. The locale specified in the \fBLC_COLLATE\fR category defines
the behavior of ranges, equivalence classes, and multi-character collating
elements used in the expression defined for \fByesexpr\fR. The locale specified
in \fBLC_CTYPE\fR determines the locale for interpretation of sequences of
bytes of text data a characters, the behavior of character classes used in the
expression defined for the \fByesexpr\fR. See \fBlocale\fR(5).
.SH EXIT STATUS
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
All \fIpath\fR operands were traversed successfully.
.RE

.sp
.ne 2
.na
\fB\fB>0\fR\fR
.ad
.RS 6n
An error occurred.
.RE

.SH FILES
.ne 2
.na
\fB\fB/etc/passwd\fR\fR
.ad
.RS 20n
Password file
.RE

.sp
.ne 2
.na
\fB\fB/etc/group\fR\fR
.ad
.RS 20n
Group file
.RE

.sp
.ne 2
.na
\fB\fB/etc/dfs/fstypes\fR\fR
.ad
.RS 20n
File that registers distributed file system packages
.RE

.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
CSI	Enabled
_
Interface Stability	Committed
_
Standard	See \fBstandards\fR(5).
.TE

.SH SEE ALSO
.LP
\fBchmod\fR(1), \fBcpio\fR(1), \fBsh\fR(1), \fBtest\fR(1), \fBls\fR(1B),
\fBacl\fR(5), \fBregex\fR(5), \fBstat\fR(2), \fBumask\fR(2),
\fBattributes\fR(5), \fBenviron\fR(5), \fBfsattr\fR(5), \fBlargefile\fR(5),
\fBlocale\fR(5), \fBstandards\fR(5)
.SH WARNINGS
.LP
The following options are obsolete and will not be supported in future
releases:
.sp
.ne 2
.na
\fB\fB-cpio\fR \fIdevice\fR\fR
.ad
.RS 17n
Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR format
(5120-byte records).
.RE

.sp
.ne 2
.na
\fB\fB-ncpio\fR \fIdevice\fR\fR
.ad
.RS 17n
Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR \fB-c\fR
format (5120-byte records).
.RE

.SH NOTES
.LP
When using \fBfind\fR to determine files modified within a range of time, use
the \fB-mtime\fR argument \fBbefore\fR the \fB-print\fR argument. Otherwise,
\fBfind\fR gives all files.
.sp
.LP
Some files that might be under the Solaris root file system are actually mount
points for virtual file systems, such as \fBmntfs\fR or \fBnamefs\fR. When
comparing against a \fBufs\fR file system, such files are not selected if
\fB-mount\fR or \fB-xdev\fR is specified in the \fBfind\fR expression.
.sp
.LP
Using the \fB-L\fR or \fB-follow\fR option is not recommended when descending a
file-system hierarchy that is under the control of other users. In particular,
when using \fB-exec\fR, symbolic links can lead the \fBfind\fR command out of
the hierarchy in which it started. Using \fB-type\fR is not sufficient to
restrict the type of files on which the \fB-exec\fR command operates, because
there is an inherent race condition between the type-check performed by the
\fBfind\fR command and the time the executed command operates on the file
argument.