FIND(1)

NAME
find - find files meeting a given condition

SYNOPSIS
find directory expression

EXAMPLES

DESCRIPTION

Find descends the file tree starting at the given directory checking each file in that directory and its subdirectories against a predicate. If the predicate is true, an action is taken. The predicates may be connected by -a (Boolean and), -o (Boolean or) and ! (Boolean negation). Each predicate is true under the conditions specified below. The integer n may also be +n to mean any value greater than n, -n to mean any value less than n, or just n for exactly n.

    -name s    true if current filename is s (include shell wild cards)
    -size n    true if file size is n blocks
    -inum n    true if the current file's i-node number is n
    -mtime n    true if modification time relative to today (in days) is n
    -links n    true if the number of links to the file is n
    -newer f    true if the file is newer than f
    -perm n    true if the file's permission bits = n (n is in octal)
    -user u    true if the uid = u (a numerical value, not a login name)
    -group g    true if the gid = g (a numerical value, not a group name)
    -type x    where x is bcdfug (block, char, dir, regular file, setuid, setgid)
    -xdev    do not cross devices to search mounted file systems

Following the expression can be one of the following, telling what to do when a file is found:

    -print    print the file name on standard output
    -print0    print the file name terminated by a null character, to be
    used with xargs -0. (Minix extension).
    -exec    execute a command, {} stands for the file name
    -ok    prompts before executing the command

SEE ALSO
test(1), xargs(1).