®nd(1)

®nd(1)

aThe time the ®le was last accessed

cThe time the inode of the ®le was last modi®ed m The time the ®le was last modi®ed

 

If the tv2 character is omitted, it defaults to m. Note that the -neweroption is

 

equivalent to -newermm.

 

Syntax examples;

 

-newera ®le

 

-newermc ®le

-inum n

True if the ®le serial number (inode number) is n. Note that ®le serial numbers

 

are unique only within a given ®le system. Therefore, matching ®le serial

 

numbers does not guarantee that the referenced ®les are the same unless you

 

restrict the search to a single ®le system.

-linkedto path

True if the ®le is the same physical ®le as the ®le speci®ed by path (i.e., linked to

 

path). This primary is similar to -inum, but correctly detects when a ®le is

 

hard-linked to path, even when multiple ®le 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 aggre-

 

gates a set of pathnames and executes on the set. The reason for preferring + to

 

a semicolon is vastly improved performance. Any command argument {} is

 

replaced by the current path name. cmd may contain supplementary code set

 

characters.

-ok cmd

Same as -execexcept that the generated command line is printed with a ques-

 

tion mark ®rst, and is executed only if the user responds by typing y. The form

 

of the af®rmative 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 ®le on device in cpio(4) format (5120-byte records). The use of

 

-cpioimplies -depth. Always true.

-ncpio

Same as -cpiobut adds the -coption to cpio. The use of -ncpioimplies

 

-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 -pruneis useless if the -depthoption

 

has also been given. See the description of -onlyand the EXAMPLES section,

 

below, for more information. Always true.

-only

This is a positive-logic version of -prune. A -pruneis performed after every

 

directory, unless -onlyis 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 -onlyis useless if the -depthoption 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):

! expression

Logical NOT operator. True if expression is not true.

expression [-a]expression Logical AND operator. True if both of the expressions are true.

expression -oexpression Logical OR operator. True if either or both of the expressions are true.

If expression is omitted, or if none of -print, -ok, -exec, -cpio, or -ncpiois speci®ed, -printis assumed. The -user, -group, and -newerprimaries each evaluate their respective arguments once.

HP-UX Release 11i: December 2000

− 3 −

Section 1273

f