HP-UX Reference (11i v2 03/08) - 1 User Commands A-M (vol 1)

f
find(1) find(1)
-newer file True if the current file has been modified more recently than the argument
file.
-newer[tv1[tv2]] file True if the indicated time value (tv1) of the current file is newer than the indi-
cated time value (tv2)offile. The time values tv1 and tv2 are each selected
from the set of characters:
a The time the file was last accessed
c The time the inode of the file was last modified
m The time the file was last modified
If the tv2 character is omitted, it defaults to
m. Note that the -newer option
is equivalent to
-newermm.
Syntax examples;
-newera file
-newermc file
-inum n True if the file serial number (inode number) is n. Note that file serial
numbers are unique only within a given file system. Therefore, matching file
serial numbers does not guarantee that the referenced files are the same
unless you restrict the search to a single file system.
-linkedto path True if the file is the same physical file as the file specified by path (i.e., linked
to path). This primary is similar to
-inum, but correctly detects when a file is
hard-linked to path, even when multiple file systems are searched.
-print Causes the current path name to be printed. 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 (+) (semicolon and plus
are special to the shell and must be escaped). When a plus sign is used, cmd
aggregates a set of pathnames and executes on the set. The reason for prefer-
ring + to a semicolon is vastly improved performance. Any command argu-
ment {} is replaced by the current path name. cmd may contain supplemen-
tary code set characters.
-ok cmd Same as -exec except that the generated command line is printed with a
question mark first, and is executed only if the user responds by typing y. The
form of the affirmative response is locale dependent: y in the C locale, see
LANG on environ(5). cmd may contain supplementary code set characters.
-cpio device Write the current file on device in cpio(4) format (5120-byte records). The use
of -cpio implies -depth. Always true.
-ncpio Same as -cpio but adds the -c option to cpio. The use of -ncpio
implies
-depth. Always true.
-prune If the current entry is a directory, cause find to skip that directory. This can
be useful to avoid walking certain directories, or to avoid recursive loops when
using cpio -p. Note, however, that -prune is useless if the -depth option
has also been given. See the description of -only and the EXAMPLES sec-
tion, below, for more information. Always true.
-only This is a positive-logic version of -prune.A-prune is performed after
every directory, unless -only is successfully evaluated for that directory. As
an example, the following three commands are equivalent:
find . -fsonly hfs -print
find . -print -fstype hfs -only
find . -print ! -fstype hfs -prune
Note, however, that -only is useless if the -depth option has also been
given. Always true.
( expression ) True if the parenthesized expression is true. The spaces are required.
Parentheses are special to the shell and must be escaped, as in \( and \).
Primaries can be combined by using the following operators (in order of decreasing precedence):
HP-UX 11i Version 2: August 2003 3 Hewlett-Packard Company Section 1283