Find files from a specific user

To day I wanted to find some file that where owned by root in the Oracle tree,  miraculously they where owned by the wrong user.

With the following command you can find the files your looking for:

find . -user root -group root

With the following command you can change the ownership of the files:

find . -user root -group root -exec sudo /bin/chown oracle:oinstall {} \;

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>