[olug] Chgrp / chown question

Kenton Brede xyf at nixnotes.org
Thu Sep 11 20:08:20 UTC 2003


On Thu, Sep 11, 2003 at 02:52:01PM -0500, Tim - DZ wrote:
> I knew I wasn't stating my question quite clearly...
> 
> I don't want to do all the files, just the specific ones...
> So:
> 
> [root at server]# ls -al 
> total 32
> drwxr-x--x    6 root     grpA         4096 Aug  8 08:50 .
> drwxr-xr-x    8 owner1   grpA         4096 Sep 11 14:05 ..
> drwxr-xr-x    9 owner1   grpB         4096 Feb 17  2003 These
> -rwxrwxr-x    1 root     grpC         2886 Feb 17  2003 DirNFile
> -rwxrwxr-x    1 owner2   grpA         3126 Feb 17  2003 Names
> drwxr-xr-x    3 owner1   grpC         4096 Feb 17  2003 Dont
> drwxrwx--x    6 owner2   grpB         4096 Feb 17  2003 really
> drwxr-xr-x    7 owner3   grpA         4096 Aug  8 09:14 matter
> 
> I want all the files/dirs owned by owner1 to now be owned by a user
> called "joe" (even on files/dirs lower that current)
> and leave files/dirs owned by owners2,3 and root alone.
> 
> chmod -R -from=owner1 joe
>

chown -R joe These Dont
 
> Ok, so that's good to go
> 
> Now I want all files/dirs in the grpB to now be in grpQ (even on
> files/dirs lower than current)
> And leave files/dirs owned by groups A and C alone.

chgrp -R grpQ These really

Is that what you want or are you wanting to script the process?
Kent

-- 
"I am always doing that which I can not do, 
   in order that I may learn how to do it." --Pablo Picasso



More information about the OLUG mailing list