Sujet : Re: syntax of "find" - am I losing my mind?
De : marrgol (at) *nospam* address.invalid (marrgol)
Groupes : comp.unix.shellDate : 27. Dec 2024, 22:59:30
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vkn802$3nnb8$1@dont-email.me>
References : 1 2
User-Agent : Mozilla/5.0 (rv:102.0) Gecko/20100101, Betterbird/102
On 2024-12-27 at 22:39 marrgol wrote:
On 2024-12-27 at 21:08 Kenny McCormack wrote:
I'm trying to find all files in my home dir that are not in group foo or
group bar. Most of my files are in one or the other of these groups.
>
This is my tcsh command line:
>
% find ~ -xdev \! \( -group foo -o -group bar \) -ls
>
This dumps out every file. It should just dump out a few. Why?
>
I tried replacing \! with -not and I tried replacing -o with -or.
Neither helped.
>
I'm sure I've done this sort of thing in the past (successfully).
$ find ~ -xdev -not -group foo -not -group bar -ls
I've just tried your version too and both give the the same and correct
result -- are you sure you are using GNU findutils find? Mine is v4.8.0.