On linux how can make a list of files that are owned by a particular owner and then fix the group and owner?

Posted by Stuart Woodward on Server Fault See other posts from Server Fault or by Stuart Woodward
Published on 2012-03-29T10:02:17Z Indexed on 2012/03/29 11:32 UTC
Read the original article Hit count: 241

Filed under:
|
|

I have a deep and complex file system where some files have been accidently written by root. I want to change the ownership of those files back to the original owner in one go.

I am playing with commands like:

find /folder -type f | xargs ls -l | grep "root root" 

but there is a lot of garbage coming out too.

I want to make a list first and then change only the files in that list after confirmation.

© Server Fault or respective owner

Related posts about linux

Related posts about redhat