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.

Change Ownership Recursively for a Single User Linux
Tagged on:     

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.