find.1 (2010 09)

f
find(1) find(1)
NAME
find - find les
SYNOPSIS
find [-H-L] pathname_list [expression ]
DESCRIPTION
The
find command recursively descends the directory hierarchy for each path name in pathname_list
(that is, one or more path names) seeking files that match a Boolean expression written in the primaries
given below. By default,
find does not follow symbolic links; see Options .
The Boolean expression is evaluated using short-circuit evaluation. This means that whenever the result
of a Boolean operation (AND or OR) is known from evaluating the left-hand argument, the right-hand
argument is not evaluated.
In the descriptions of the primaries, the argument n represents a decimal integer;
+n means more than n,
-n means less than n, and n means exactly n.
Options
The
find command recognizes the following options:
-H For each symbolic link specified in pathname_list on the command line, the
find command
evaluates the file information and file type of the file referenced by the symbolic link, and not the
link itself. If the file referenced by symbolic link does not exist, the
find command evaluates
the file information and file type for the link itself. For all symbolic links not on command line,
the find command evaluates the file information and file type for the link itself.
-L For each symbolic link specified on the command line in pathname_list or encountered in the file
hierarchy, the
find command evaluates the file information and file type of the file referenced
by symbolic link, and not the link itself.
Primaries
The
find command recognizes the following primaries which are used in the Boolean expression :
-atime n
True if the file access time subtracted from the initialized time is n-1 to n multiples of 24 h. The
initialization time shall be a time between the invocation of the
find utility and the first access
by that invocation of the
find utility to any file specified by its path
operands. The access time
of directories in pathname_list is changed by
find itself.
-cpio device
Write the current file on device in cpio (4) format (5120-byte records). The use of
-cpio implies
-depth. Always true.
-ctime n
True if the time of last change of file status information subtracted from the initialization time is
n-1 to n multiples of 24 h. The initialization time shall be a time between the invocation of the
find utility and the first access by that invocation of the find utility to any file specified by its
path operands.
-depth
A position-independent term which 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 find
is used with cpio (see cpio(1)) to transfer files that are contained in directories without write
permission. It is also useful when using cpio and the modification dates of directories must be
preserved. Always true.
-exec cmd
True if the executed cmd returns a zero value as exit status. The end of cmd must be punctuated
by a semicolon (;) or a plus sign (+). The semicolon and plus are special to the shell and must be
escaped with a backslash (\). When + is used, cmd aggregates a set of path names and executes
on the set. Any command arguments between the first occurrence of curly braces {} and plus
sign + are ignored. In the UNIX 2003 environment, + indicates end of cmd, only if + immedi-
ately follows {}. The reason for preferring + to a ; is improved performance. With the ;, the
command in -exec cmd executes for each match that the command finds. However, with {} +,
the command executes only once.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (8 pages)