Up: findthe file searcher
The expression part can be divided itself in four different groups
of keywords: options, tests, actions, and
operators. Each of them can return a true/false value, together with a
side effect. The difference among the groups is shown below.
- affect the overall operation of find, rather than the
processing of a single file. An example is -follow, which instructs
find to follow symbolic links instead of just stating the inode.
They always return true.
- are real tests (for example, -empty checks whether the
file is empty), and can return true or false.
- have also a side effect
the name of the considered file. They can return true or false too.
- do not really return a value (they can conventionally be
considered as true), and are used to build compress expression. An example
is -or, which takes the logical OR of the two subexpressions on its
side. Notice that when juxtaposing expression, a -and is implied.
Note that find relies upon the shell to have the command line parsed;
it means that all keyword must be embedded in white space and especially
that a lot of nice characters have to be escaped, otherwise they would be
mangled by the shell itself. Each escaping way (backslash, single and
double quotes) is OK; in the examples the single character keywords will be
usually quoted with backslash, because it is the simplest way (at least in
my opinion. But it's me who is writing these notes!)
Mon Apr 1 08:59:56 EST 1996