sdffind(1)
NAME
sdffind − find files in an SDF system
SYNOPSIS
sdffind path-name-list expression
DESCRIPTION
sdffind is intended to mimic find(1).
An SDF file name is recognized by the embedded colon (:) delimiter (see sdf(4) for SDF file naming conventions).
sdffind recursively descends the directory hierarchy for each path name in path-name-list (i.e., one or more path names) seeking files that match a boolean expression written in the primaries given below.
−name pattern True if pattern matches the current file name.
−perm onum True if the file permission flags exactly match the octal number onum (see chmod(1)). If onum is prefixed by a minus sign, more flag bits (017777, see stat(2)) become significant and the flags are compared:
(flags&onum)==onum
−type c True if the type of the file is c, where c is b, c, d, p, or f for block special file, character special file, directory, fifo (a.k.a named pipe), or plain file.
−type n True if the current file being examined by sdffind is a network special file.
−links n True if the file has n links.
−user uname True if the file belongs to the user uname. If uname is numeric and does not appear as a login name in the /etc/passwd file (on the local system, not the SDF file system), it is taken as a user ID.
−group gname True if the file belongs to the group gname. If gname is numeric and does not appear in the /etc/group file (on the local system, not the SDF file system), it is taken as a group ID.
−size n True if the file is n blocks long.
−exec cmd True if the executed cmd returns a zero value as exit status. The end of cmd must be punctuated by an escaped semicolon. A command argument {} is replaced by the current path name.
−ok cmd Like −exec except that the generated command line is printed with a question mark first, and is executed only if the user responds by typing y.
−print Always true; causes the current path name to be printed. This option must be included on the sdffind command line anytime you want sdffind to print the path names it has found on the standard output. If −print is not specified, sdffind locates the files, but fails to tell you about them!
When −print is specified as the only expression, sdffind prints the absolute path names of all files it finds, beginning at each directory in the path-name-list. If −print is included as the last component of an expression, sdffind prints the absolute path names of only those files that satisfy the other primaries in expression.
−inum n True if the file has inode number n.
EXAMPLES
The following examples assume that an SDF directory structure exists on HP-UX device file /dev/rdsk/c3d0s0.
Print the names of all files on SDF volume /dev/rdsk/c3d0s0:
sdffind /dev/rdsk/c3d0s0: -print
Print the name of all the subdirectories under /usr/lib on the SDF file system:
sdffind /dev/rdsk/c3d0s0:/usr/lib −type d −print
Give a long listing of every ordinary file under /users on the SDF file system:
sdffind /dev/rdsk/c3d0s0:/users −type f −exec sdfls -l {} ’;’
Find all files named core on the SDF volume and ask whether they should be removed:
sdffind /dev/rdsk/c3d0s0: -name core -ok sdfrm {} ’;’
AUTHOR
sdffind was developed by HP.
FILES
/etc/passwd
/etc/group
SEE ALSO
sdf(4), find(1), stat(2), chmod(1).
Hewlett-Packard Company — HP-UX Release 9.10: April 1995