Annotation of researchv10dc/man/adm/man1/find.1, revision 1.1.1.1

1.1       root        1: .TH FIND 1 
                      2: .CT 1 files dirs
                      3: .SH NAME
                      4: find \- find files
                      5: .SH SYNOPSIS
                      6: .B find
                      7: .I pathname ... expression
                      8: .SH DESCRIPTION
                      9: .I Find
                     10: recursively descends
                     11: the directory hierarchy for each
                     12: .I pathname,
                     13: seeking files that match a boolean
                     14: .I expression,
                     15: which consists of one or more arguments.
                     16: It does not follow symbolic links.
                     17: In the following descriptions of primary expressions,
                     18: .I n
                     19: is a decimal integer;
                     20: .BI + n
                     21: may be written to specify more than 
                     22: .I n
                     23: and
                     24: .BI - n
                     25: to specify less. 
                     26: .TP 10n
                     27: .BI -name " filename"
                     28: True if the
                     29: .I filename
                     30: argument matches the current file name.
                     31: Normal shell filename metacharacters may be used if quoted.
                     32: .TP
                     33: .BI -perm " onum"
                     34: True if the file permission flags
                     35: exactly
                     36: match the
                     37: octal number
                     38: .I onum
                     39: (see
                     40: .IR  chmod (1)).
                     41: If
                     42: .I onum
                     43: is prefixed by a minus sign,
                     44: more mode bits (017777, see
                     45: .IR   stat (2))
                     46: become significant and
                     47: the modes are compared:
                     48: .IR (mode&onum)==onum .
                     49: .TP
                     50: .BI -type " c"
                     51: True if the type of the file
                     52: is
                     53: .I c,
                     54: where
                     55: .I c
                     56: is
                     57: .BI b ", " c ", " d ", "
                     58: .BI f ", "
                     59: or
                     60: .B L
                     61: for
                     62: block special file, character special file,
                     63: directory, plain file or symbolic link.
                     64: .TP
                     65: .BI -links " n"
                     66: True if the file has
                     67: .I n
                     68: links.
                     69: .TP
                     70: .BI -user " uname"
                     71: True if the file belongs to the user
                     72: .I uname
                     73: (login name or numeric userid).
                     74: .TP
                     75: .BI -group " gname"
                     76: True if the file belongs to group
                     77: .I gname
                     78: (group name or numeric groupid).
                     79: .TP
                     80: .BI -size " n"
                     81: True if the file is
                     82: .I n
                     83: blocks long (512 bytes per block).
                     84: .TP
                     85: .BI -inum " n"
                     86: True if the file has inode number
                     87: .I n.
                     88: .TP
                     89: .BI -atime " n"
                     90: True if the file has been accessed in
                     91: .I n
                     92: days.
                     93: .TP
                     94: .BI -mtime " n"
                     95: True if the file has been modified in
                     96: .I n
                     97: days.
                     98: .TP
                     99: .BI -ctime " n"
                    100: True if the inode has been changed in
                    101: .I n
                    102: days.
                    103: .TP
                    104: .BI -exec " command"
                    105: True if the executed command returns
                    106: a zero value as exit status.
                    107: The end of the command must be punctuated by an escaped
                    108: semicolon.
                    109: A command argument 
                    110: .L {}
                    111: is replaced by the
                    112: current pathname.
                    113: .TP
                    114: .BI -ok " command"
                    115: Like
                    116: .B -exec
                    117: except that the generated command is written on
                    118: the standard output, then the standard input is read
                    119: and the command executed only upon response
                    120: .BI y .
                    121: .TP
                    122: .B  -print
                    123: Always true;
                    124: causes the current pathname to be printed.
                    125: .TP
                    126: .BI -newer " file"
                    127: True if
                    128: the file has been modified more recently than the argument
                    129: .I file.
                    130: .TP
                    131: .BI -status " n
                    132: True if
                    133: .IR lstat 
                    134: (see
                    135: .IR stat (2))
                    136: applied to the file yields error number
                    137: .IR n ;
                    138: see
                    139: .IR intro (2).
                    140: Testing
                    141: .L -status
                    142: turns off diagnostics that errors normally produce.
                    143: On ordinary systems a nonzero error number occurs when a file 
                    144: disappears underfoot or a file system is in trouble.
                    145: .PP
                    146: The following operators, listed in order of decreasing precedence,
                    147: may be used to combine primary expressions.
                    148: .TP 
                    149: .BI ( " expression " )
                    150: Group with parentheses.
                    151: .TP
                    152: .BI ! " expression
                    153: Negation.
                    154: True if and only if
                    155: .I expression 
                    156: is not true.
                    157: .TP
                    158: .I expression expression
                    159: Conjunction.
                    160: True if both expressions are true.
                    161: .TP
                    162: .IB expression " -o " expression
                    163: Disjunction.
                    164: True if either expression is true.
                    165: .SH EXAMPLES
                    166: .HP
                    167: .L
                    168: find / \e( -name a.out -o -name '*.o' \e) -atime +7 -exec rm '{}' \e;
                    169: .br
                    170: Remove all files named
                    171: .L a.out
                    172: or
                    173: .L *.o
                    174: that have not been accessed for a week.
                    175: .SH FILES
                    176: .F /etc/passwd
                    177: .br
                    178: .F /etc/group
                    179: .SH "SEE ALSO"
                    180: .IR sh (1), 
                    181: .IR test (1), 
                    182: .IR filsys (5)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.