Sujet : Re: syntax of "find" - am I losing my mind?
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.shellDate : 28. Dec 2024, 02:16:54
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <vknji6$28kfk$1@news.xmission.com>
References : 1 2
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
slrnvmub16.22so.naddy@lorvorc.mips.inka.de>,
Christian Weisgerber <
naddy@mips.inka.de> wrote:
On 2024-12-27, Kenny McCormack <gazelle@shell.xmission.com> 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
>
Works for me.
OK - I've got this sorted now.
tl; dr: It works if you put in the correct numeric gid(s) rather than the
symbolic group names. So, I am not losing my mind, and the syntax is
correct.
Longer version: The system on which I am running this (not my system) is a
little bit misconfigured, such that even though both ls and find display
the group id of my files as "foo", and "foo" is defined in /etc/group as
having gid (say) 1234, in fact, my files are not in group 1234, but rather
in group (say) 5678.
So, bottom line, when you use the name "foo" in the command line, "find"
translates that to 1234 and looks for files not in group 1234 (which is
almost all of them) and so on...
-- I'll give him credit for one thing: He is (& will be) the most quotable Presidentever. Books have been written about (GW) Bushisms, but Dubya's got nothing on Trump. Tremendously wet - from the standpoint of water.