recursive search to find out the group

recursive search to find out the group

Post by Ken Pizzi » Fri, 05 Mar 1999 04:00:00




>Iam working on a shell script which does the following      1)goes to a base dir
>and traverses thro the dir structure  and find files/dirs which doesnot
>belong to group yyy and 2)also searches for files/dirs that don't have      775
>permissions  I got the second part working using  find . -name | xargs ls -ld
>| grep -v '*rwxrwxr-x'      but cannot figure out how to find out files/dirs that
>donot belong to group yyy recursively

Just use find:
  find . \( ! -group yyy -o ! -perm 0775 \) -print

                --Ken Pizzini