Recursively assign ownership to files and folders

To change the ownership of all files and folders with a certain group and / or user insight the current folder recursively you can run the following command:

$> sudo find . -group OLDGROUP -user OLDUSER -exec chown NEWUSER:NEWGROUP {} \;

This way you can set the owning group and / or user.

Leave a Reply

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

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.