.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\" @(#)find.1 6.5 (Berkeley) %G%
the directory hierarchy for
(i.e., one or more pathnames)
seeking files that match a boolean
written in the primaries given below.
In the descriptions, the argument
is used as a decimal integer
argument matches the current file name.
argument syntax may be used if escaped (watch out for
True if the file permission flags
is prefixed by a minus sign,
more flag bits (017777, see
True if the type of the file
block special file, character special file,
directory, plain file, symbolic link, or socket.
True if the file belongs to the user
(login name or numeric user ID).
True if the file belongs to a user
in the /etc/passwd database.
True if the file belongs to group
(group name or numeric group ID).
True if the file belongs to a group
in the /etc/group database.
blocks long (512 bytes per block).
True if the file has inode number
True if the file has been accessed in
True if the file has been modified in
True if the executed command returns
a zero value as exit status.
The end of the command must be punctuated by an escaped
A command argument `{}' is replaced by the
except that the generated command is written on
the standard output, then the standard input is read
and the command executed only upon response
causes the current pathname to be printed.
causes current pathname to be printed together
with its associated statistics.
These include (respectively) inode number,
size in kilobytes (1024 bytes),
If the file is a special file
the size field will instead contain the major and minor
If the file is a symbolic link the
pathname of the linked-to file is printed preceded by ``->''.
The format is identical to that of ``ls -gilds''
(note however that formatting is done internally,
without executing the ls program).
the current file has been modified more recently than the argument
Write the current file on the argument
to traverse down into a file system different
from the one on which current
causes find to traverse symbolic links to directories.
Normally find does not traverse symbolic links.
The primaries may be combined using the following operators
(in order of decreasing precedence):
A parenthesized group of primaries and operators
(parentheses are special to the Shell and must be escaped).
The negation of a primary
Concatenation of primaries
is implied by the juxtaposition of two primaries).
To typeset all variants of manual pages for `ls':
vtroff -man `find '*man*/ls.?'`
To remove all files named
`a.out' or `*.o' that have not been accessed for a week:
find / \e( \-name a.out \-o \-name '*.o' \e) \-atime +7 \-exec rm {} \e\;
More than one `-newer' option does not work properly.