Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
User Commands (d - f)
find(1)
NAME
find - Finds files matching an expression
SYNOPSIS
find pathname ... [ -W NOG ][-W NOE ][expression ...]
FLAGS
HP Extensions
-W NOG Specifies that the /G directory should be omitted when the initial directory is root.
This flag is ignored when the initial directory is not /, /E,or/E/system.
-W NOE Specifies that the /E directory should be omitted when the initial directory is root.
This flag is ignored when the initial directory is not root.
Specify both the -W NOG and -W NOE flags to omit both the /G and /E directories.
DESCRIPTION
The find command recursively searches the directory tree for each specified pathname, seeking
files that match a Boolean expression written using terms given later. The output from find
depends on the terms used in expression.
Expressions
In the following descriptions, the argument number is a decimal integer that can be specified as
+number (more than number), -number (less than number), or number (exactly number).
The first argument that starts with a - (dash) or is a ! (exclamation point) or a ( (left parenthesis)
and all subsequent arguments are interpreted as an expression.
-name pattern
TRUE if pattern matches the basename of a filename. You can use pattern-matching
characters, provided they are quoted.
-perm [-]mode
TRUE if the file permission code of the file exactly matches mode (see the reference
page for the chmod command). If the optional - (dash) is present, this expression evalu-
ates to TRUE if at least these permissions are set. If the - is omitted, the expression
evaluates to TRUE when the file permission bits exactly match the value of the resulting
template.
The mode argument can be up to three octal digits. This argument is used to represent
file mode bits. It is identical in format to the symbolic mode argument described for the
chmod command and is interpreted as follows:
• To start, a template is assumed with all file mode bits cleared.
• The symbol + (plus sign) sets the appropriate mode bits in the template, whereas
a symbol of - (minus sign) clears the appropriate bits. A - (minus sign) cannot
be the first character of mode because it could create ambiguity with the optional
leading - (dash). Because the initial mode is all bits off, there are no symbolic
modes that need to use - (minus sign) as the first character.
• The symbol = (equal sign) sets the appropriate mode bits without regard to the
contents of the process’s file mode creation mask.
527188-004 Hewlett-Packard Company 3−137