5

Actually I want to find all the files and folders that are under the same group, for example I have this :

[test]     user1/sam
a.txt      user9/sam
b.txt      user4/sam

I'm looking for a command that show me, all files and folders under the same group.

7

Using GNU find, you can search for all directories and files that belong to groupX:

find / -group groupX

From man find:

   -group gname
          File belongs to group gname (numeric group ID allowed).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.