3

Is there anyway I can list all the files that belong to a particular owner?

Additionally can I list all the files that belong to a group?

10

find should answer:

sudo find / -user root

To search a specific directory, just replace / with the full path. You can drop the sudo part of the command if you don't mind warnings about being unable to read special files.

For group ownership finds, use:

sudo find / -group root
  • I was going to suggest some hackery using cut and grep, but this is much cleaner. – Huckle Mar 22 '12 at 4:00

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.