Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

User Commands (d - f)
nd(1)
all of its subdirectories. This search may take a while, so it is best to limit the search by
specifying the directories where you think the les might be.
2. To list the les with a specic permission code in the current directory tree, enter:
nd . -perm 0600
This command lists the names of the les that have only owner-read and owner-write per-
mission. The . (dot) tells the nd command to search the current directory and its sub-
directories. See the reference page for the chmod command for details about permission
codes. Alternatively, you could enter the following:
nd . -perm u+rw
3. To search several directories for les with certain permission codes, enter:
nd manual clients proposals -perm -0600
This command lists the names of the les that have owner-read and owner-write permis-
sion and possibly other permissions. The directories manual, clients, and proposals, and
their subdirectories, are searched. Note that the expression -perm 0600 in the previous
example selects only les with permission codes that match 0600 exactly. In this exam-
ple, the expression -perm -0600 selects les with permission codes that allow at least the
accesses indicated by 0600. This command also matches the permission codes 0622 and
2744.
4. To search for regular les with multiple links, enter:
nd . -type f -links +1
This lists the names of the ordinary les (-type f) that have more than one link (-links +1).
Note that every directory has at least two links: the entry in its parent directory and its
own . (dot) entry. See the reference page for the ln command for details about multiple
le links.
5. To search for the le f1 among the OSS les on the remote node node1,enter:
export UTILSGE=NOG
nd /E/node1 -name f1 -print
6. To search for the le f1 among the OSS les on the local node, enter:
nd / -W NOG -W NOE -name f1 -print
NOTES
Because /G and /E both appear in your local root directory, you should be very careful when using
OSS shell commands on or from the root directory. OSS shell commands that perform recursive
actions make no distinction between Guardian and OSS les or between local and remote les.
You can use the -W NOG and -W NOE ags or the UTILSGE environment variable to exclude
objects in the Guardian le system or objects accessible through the Expand product.
EXIT VALUES
The nd command returns a 0 (zero) if all the paths are visited without error. The nd command
returns a nonzero value if it encounters an error.
RELATED INFORMATION
Commands: chmod(1), grep(1), ln(1), sh(1), test(1).
Functions: stat(2).
527188-003 Hewlett-Packard Company 3141