update ownership for files

To transfer the ownership of files in a directory recursively from a user / group to another, you can use this simple one-liner:

find . -user old_user -group old_group -print0 | xargs -0 chown -v -h new_user:new_group

I have found it here. There also the individual parameters are explained in more detail.

Leave a comment

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