The find2perl utility converts find(1) command lines to
equivalent Perl code. The resulting code is typically faster than
running find itself.
The paths arguments specify where find2perl starts
its searches. The predicate arguments can be one of the
following:
!predicate
Negate the sense of the following predicate. The ! must
be passed as a distinct argument, so it may need to be surrounded
by spaces and/or quoted from interpretation by the shell using a
backslash (just as with using find).
(predicate ... )
Group the given predicates. The parentheses must be passed as
distinct arguments, so they may need to be surrounded by spaces or
quoted from interpretation by the shell using a backslash (just as
with using find).
predicate1predicate2
True if both predicate1 and predicate2 are true;
predicate2 is not evaluated if predicate1 is
false.
predicate1-opredicate2
True if either predicate1 or predicate2 is true;
predicate2 is not evaluated if predicate1 is
true.
-follow
Follow (de-reference) symbolic links. The checking of file
attributes depends on the position of the -follow option. If
it precedes the file-check option, stat(2) is used, which
means the file check applies to the file to which the symbolic link
is pointing. If the -follow option follows the file-check
option, this now applies to the symbolic link itself; that is,
lstat(2) is done.
-depth
Change directory traversal algorithm from breadth-first to
depth-first.
-prune
Do not descend into the directory currently matched.
-xdev
Do not traverse mount points (prunes search at mount-point
directories).
-nameglob
File-name matches specified glob wildcard pattern. The
glob argument may need to be quoted to avoid interpretation
by the shell (just as with using find).
-permperm
Low-order nine bits of permission match octal value
perm.
-perm -perm
The bits specified in perm are all set in files'
permissions.
-type x
The file's type matches the Perl -x
operator.
-fstypetype
File system of current path is of type type (only
NFS/non-NFS distinction is implemented).
-useruser
True if user is owner of file.
-groupgroup
True if file's group is group.
-nouser
True if file's owner is not in password database.
-nogroup
True if file's group is not in group database.
-inuminum
True file's inode number is inum.
-linksn
True if (hard) link count of file matches n (see
discussion later in this topic).
-sizen
True if file's size matches n (see discussion later in
this topic). The n argument is normally counted in 512-byte
blocks, but a suffix of c specifies that size should be
counted in characters (bytes); a suffix of k specifies that
size should be counted in 1024-byte blocks.
-atimen
True if last-access time of file matches n (measured in
days) (see discussion later in this topic).
-ctimen
True if last-changed time of file's inode matches n
(measured in days; see discussion later in this topic).
-mtimen
True if last-modified time of file matches n (measured
in days; see discussion later in this topic).
-newerfile
True if last-modified time of file matches file.
-print
Print out path of file (always true).
-print0
Like -print, but terminates with \0 instead of \n.
-execoptions;
Call exec(2) with the arguments in options
to run in a subprocess; any occurences of {} in
options will first be substituted with the path of the
current file. Note that the command rm(1) has been special-cased to use the
Perl unlink() function instead (as an optimization). The
; must be passed as a distinct argument, so it may need to
be surrounded by spaces and/or quoted from interpretation by the
shell using a backslash (just as with using find).
-okoptions;
Like -exec, but first prompts user; if the user's
response does not begin with a y, do not execute
options. The ; must be passed as a distinct argument,
so it may need to be surrounded by spaces and/or quoted from
interpretation by the shell using a backslash (just as with using
find).
-evalexpression
Has the Perl script eval() the expression.
-ls
Simulates -exec ls -dils {} ;
-tarfile
Adds current output to tar-format file.
-cpiofile
Adds current output to old-style copy in-out (cpio)-format
file.
-ncpiofile
Adds current output to "new"-style cpio-format
file.
Predicates that take a numeric argument n can come in the
following three forms:
If n is prefixed with a plus (+): match values
greater than n
If n is prefixed with a minus (-): match values
less than n
If n is not prefixed with either a plus (+) or
minus (-): match only values equal to n