Change Ownership Recursively for a Single User Linux

Introduction

Chown has a nice feature that will allow you to change ownership of files and directories recursively for a single user without even needing to find them. First cd into the root source directory required to change ownership of the files/directories. Then use the chown --from= version of the command a la:
chown --from=<old_user>:<old_group> <new_user>:<new_group> * -R
Also works without groups, using the numeric uid instead of name etc. I love the simple ones.

Leave a comment

Your email address will not be published. Comments are moderated before appearing.