Re: 'find' command

charlie thibault (cth@bruker.com)
Thu, 13 Jan 94 9:50:14 EST

According to Martin J. Dellwo:
> ... Turns out the 'find'
> command is useless for what I really wanted to do. But I must say the
> apparent lack of a '!' (negation) operator and '-o' (or) operator
> makes it even more useless... eg:
>
> find . !(\ -user root -o -user bin \) ...

Both negation and or operators exist. The problem with the find command
is that the syntax is far from intuitive, many characters must be
escaped and it has the potential of really messing up your directories
if you don't specify the command just right. For the example above try:

find . \( \! \( -user root -o -user bin \) \) ...

the exclamation point "!" is a special character to the shell as
are the parentheses "()" and must be escaped with the backslash "\"
to work correctly. (Note the exclamation point is only special to
the csh and tcsh shells not the bourn shell).

I recommend getting a good unix bood which describes the find command
in detail, preferably with lots of examples. "Unix Power Tools," by
Jerry Peek, Tim O'Reilly, and Mike Loukides, published by O'Reilly &
Associates is an excellent book for system administrators (and
especially defacto system administrators) since it contains lots of
practical examples.

-- 
==================================================================
	
       ...     ...	Charles G. Thibault
      .    * .    .	Manager of Software Development
       .   . .   .	Bruker Instruments Inc.
       B R U K E R	Billerica, MA. 01821 USA
       .   . .   .	(508)667-9580 x218
      .    * .    .	cth@bii.bruker.com		Internet
       ...     ...     ...!uunet!bii!cth		UUCP

=================================================================