How do I find files not belonging to particular group?
find /home -group NOT test
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
find /home -not -group test or
find /home ! -group test
The exclamation inverts the match. From
! expr True if expr is false. This character will also usually need -not expr Same as ! expr, but not POSIX compliant.
If you want the group it does belong to in the output:
find /home ! -group test -printf "%p:%g\n" ./lots/573:root ...
Some more information on using find:
How do I master the UNIX find command?