find files where group permissions equal user permissions
Posted
by
Jayen
on Super User
See other posts from Super User
or by Jayen
Published on 2012-06-17T23:33:51Z
Indexed on
2012/06/18
3:18 UTC
Read the original article
Hit count: 548
Is it possible to do something like find -perm g=u
? I say "like" because -perm mode
requires mode to specify all the bits, not just g
, and because I can't put u
on the right side of the =
, like I can with the chmod
command:
you can specify exactly one of the letters ugo: the permissions granted
to the user who owns the file (u), the permissions granted to other
users who are members of the file's group (g), and the permissions
granted to users that are in neither of the two preceding categories
(o).
At the moment, I'm doing find | xargs -d \\n ls -lartd | egrep '^.(...)\1
which is just ugly.
Thanks.
© Super User or respective owner