|
Expressions to select files withfindLast revision July 20, 2004
You can use find "selection" expressions that only filter the files, but do not perform any actions on them. This is a way to search a directory tree to find files that match the expressions. In the original find program, files in the directories specified in the dirlist that match these "selection" expressions are "selected", but nothing is done to them, not even printing their names on the terminal (standard output), unless an action expression is also given in combination. Many modern find programs, such as the one on pangea, will list the selected files to standard output as the default "action" expression. Here are the most generally useful selection expressions. In all cases, the expression selects among the files passed to it from the previous expression (or from the original directory list, if it is the first expression). See the on-line manual entry for find for other lesser-used expressions.
-name filename
find dirlist -name '*.f'
find dirlist -name test
-user accountname
-mtime n
This expression counts full days only, from midnight to midnight. The current partial day is treated as part of the previous full day.
|