Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
User Commands (d - f) find(1)
3. To search several directories for files with certain permission codes, enter:
find manual clients proposals -perm -0600
This command lists the names of the files 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 files with permission codes that match 0600 exactly. In this exam-
ple, the expression -perm -0600 selects files 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 files on the local node that have the PRIVSETID privilege, enter:
find /bin -priv PRIVSETID -print
5. To search for regular files with multiple links, enter:
find . -type f -links +1
This lists the names of the ordinary files (-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
file links.
6. To search for the file f1 among the OSS files on the remote node node1,enter:
export UTILSGE=NOG
find /E/node1 -name f1 -print
7. To search for the file f1 among the OSS files on the local node, enter:
find / -W NOG -W NOE -name f1 -print
8. To find all files not owned by user karl that have access control lists with at least one entry
associated with karl, and one entry for no specific user in group bin with the read bit on
and the write bit off, enter:
find / ! -user karl -acl u:karl:???,g:bin:r-? -print
9. To find all files that have a read bit set in any access control list entry, enter:
find / -acl *:r?? -print
10. To find all files that have the write bit unset and execute bit set in every access control list
entry, enter:
find / -acl =*:?-x -print
11. To find all files that have optional access control list entries, enter:
find / -acl opt -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 files or between local and remote files.
You can use the -W NOG and -W NOE flags or the UTILSGE environment variable to exclude
objects in the Guardian file system or objects accessible through the Expand product.
527188-021 Hewlett-Packard Company 3−145