Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

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
share|improve this answer
    
I was going to suggest some hackery using cut and grep, but this is much cleaner. –  Huckle Mar 22 '12 at 4:00
    
Thanks Caleb, this works well –  user784637 Mar 22 '12 at 15:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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