Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
User Commands (d - f)
find(1)
A type field of * matches any of the preceding types. If the type field is class, other,or*, the ID |
field is not allowed (for example, -acl *:rwx). |
The ID field is either a numeric user or group ID, a user or group ID string from the system user |
authentication database or group database, respectively, or
*, which matches any ID. |
The mode field consists of a string of three characters. The first character is either r, indicating |
that read permission is granted; -, indicating that read permission is denied; or ?, which matches |
either state of read permission. The second character is either w, -,or?, which similarly indicate |
the state of write permission; and the third character is either x, -,or?, which indicates the state of |
execute permission. |
As a special case, if aclpatt is the value opt, the expression is true for files with optional access |
control list entries.
Environment Variables
The following environment variables affect the execution of the find command:
UTILSGE Specifies that HP extensions to the root directory should be omitted when the ini-
tial directory is root and a recursive operation occurs in an OSS shell command.
Application programs that test this variable might also honor its settings.
The UTILSGE value can be any of the following:
NOE Omit the /E directory.
NOG Omit the /G directory.
NOG:NOE Omit both the /G and /E directories.
The effect of assigning a value to the UTILSGE environment variable is the same
as specifying the -W NOG or -W NOE flag in the command.
EXAMPLES
1. To list all files in the file system with a given base filename, enter:
find / -name .profile
This command searches the entire file system and writes the complete pathnames of all
files named .profile. The / (slash) tells the find command to search the root directory and
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 files might be.
2. To list the files with a specific permission code in the current directory tree, enter:
find . -perm 0600
This command lists the names of the files that have only owner-read and owner-write per-
mission. The . (dot) tells the find 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:
find . -perm u+rw
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
527188-007 Hewlett-Packard Company 3−141