Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

User Commands (d - f)
nd(1)
NAME
nd - Finds les matching an expression
SYNOPSIS
nd pathname ... [ -W NOG ][-W NOE ][expression ...]
FLAGS
HP Extensions
-W NOG Species that the /G directory should be omitted when the initial directory is root.
This ag is ignored when the initial directory is not /, /E,or/E/system.
-W NOE Species that the /E directory should be omitted when the initial directory is root.
This ag is ignored when the initial directory is not root.
Specify both the -W NOG and -W NOE ags to omit both the /G and /E directories.
DESCRIPTION
The nd command recursively searches the directory tree for each specied pathname, seeking
les that match a Boolean expression written using terms given later. The output from nd
depends on the terms used in expression.
Expressions
In the following descriptions, the argument number is a decimal integer that can be specied as
+number (more than number), -number (less than number), or number (exactly number).
The rst argument that starts with a - (dash) or is a ! (exclamation point) or a ( (left parenthesis)
and all subsequent arguments are interpreted as an expression.
-acl [ aclpatt | =aclpatt | opt ]
TRUE if the access control list (ACL) of the le matches the ACL pattern aclpatt or |
contains optional ACL entries. See "Access Control Lists (ACLs)."
-name pattern
TRUE if pattern matches the basename of a lename. You can use pattern-matching
characters, provided they are quoted.
-perm [-]mode
TRUE if the le permission code of the le 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 le 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
le 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 le 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 rst 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 rst character.
527188-007 Hewlett-Packard Company 3137