LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to chown -R don.lab * for don.users (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-chown-r-don-lab-%2A-for-don-users-383103/)

Hans Zilles 11-14-2005 02:00 PM

How to chown -R don.lab * for don.users
 
Problem...
"don.users" has files scattered all over the place.
I need to change all of them and only them to "don.lab".

Question...
Do I have to hunt them down and change them one by one
or
is there a way to apply chown only to files that have a UID of "don.users"?

makuyl 11-14-2005 02:07 PM

Perhaps something like: find / -user don -group users -print | xargs chgrp lab
Or from current dir: find . -user don -group users -print | xargs chgrp lab

Hans Zilles 11-14-2005 04:52 PM

find . -user don -group users -print | xargs chgrp lab
produced....
xargs: unmatched single quote

however...
find . -user don -group users -exec chown don.lab {} \;
worked!

Thankyou.

makuyl 11-15-2005 07:53 AM

Forgot. Thanks for posting the working solution.


All times are GMT -5. The time now is 04:43 AM.