An extremely useful command for finding particular groups of files (numerous examples follow this description). find descends the directory tree beginning at each pathname and locates files that meet the specified conditions. The default pathname is the current directory. The most useful conditions include -print (which is the default if no other expression is given), -name and -type (for general use), -exec and -size (for advanced use), and -mtime and -user (for administrators).
Conditions may be grouped by enclosing them in \( \) (escaped parentheses), negated with ! (use \! in tcsh), given as alternatives by separating them with -o, or repeated (adding restrictions to the match; usually only for -name, -type, or -perm). Note that “modification” refers to editing of a file’s contents, whereas “change” means a modification, or permission or ownership changes. In other words, -ctime is more inclusive than -atime or -mtime.
Find files that were last accessed more than n (+ n), less than n (- n), or exactly n days ago. Note that find changes the access time of directories supplied as pathnames.
Find files that were changed more than n (+ n), less than n (- n), or exactly n days ago. A change is anything that changes the directory entry for the file, such as a chmod.
Descend the directory tree, skipping directories and working on actual files first, and then the parent ...