Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sdffind(1) — HP-UX 5.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sdf(4)

find(1)

stat(2)

chmod(1)

SDFFIND(1)  —  HP-UX

Series 300, 800 Only

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 the 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 which satisfy the other primaries in the expression. 

−inum n True if the file has inode number n.

EXAMPLES

The examples that follow assume that an SDF directory structure exists on the HP-UX device file /dev/rdsk/c3d0s0. 

The first example prints the names of all files on the SDF volume /dev/rdsk/c3d0s0:

sdffind /dev/rdsk/c3d0s0: -print

The second example prints the name of all the subdirectories under /usr/lib on the SDF file system:

sdffind /dev/rdsk/c3d0s0:/usr/lib −type d −print

The third example gives a long listing of every ordinary file under /users on the SDF file system:

sdffind /dev/rdsk/c3d0s0:/users −type f −exec sdfls -l {} ’;’

The fourth example finds all the files on the SDF volume by the name of "core" and asks whether they should be removed:

sdffind /dev/rdsk/c3d0s0: -name core -ok sdfrm {} ’;’

AUTHOR

Sdffind was developed by the Hewlett-Packard Company. 

FILES

/etc/passwd
/etc/group

SEE ALSO

sdf(4), find(1), stat(2), chmod(1). 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026