Answers:
find /home -not -group test
要么 find /home ! -group test
惊叹号会使比赛倒数。来自man find
:
! expr True if expr is false. This character will also usually need
-not expr
Same as ! expr, but not POSIX compliant.
如果您希望该组确实属于输出:
find /home ! -group test -printf "%p:%g\n"
./lots/573:root
...
有关使用find的更多信息:
如何掌握UNIX find命令?