Thursday, September 21, 2006

Linux : Changing ownership with find command

Good example of find with -exec...

Following command finds all files under /var/www/html owned by user ketan and changes the owner and group to webuser and web respectively. Only root can do this.

find /var/www/html -user ketan -exec chown webuser:web {} \;

No comments: