On Thu, 07 Jun 2007 07:02:06 +0100 luxxius <[EMAIL PROTECTED]> wrote: > I can find all the files with the group that's causing the hiccup > using > > find /home/diana/music -group diana > > Is there a simple way to redirect the results to chgrp root and then > chmod them to 664 so that I can automate this in future?
find can be used to run commands: find ~/music -group diana -exec chgrp root {} \; -exec chmod 664 {} \; for each result that find turns up it will run each of the commands given as -exec arguments, replacing the {} with the file name. xargs could also be used here to substitute the results of the find into arbitrary positions in other commands (useful when the results come from something other than find which doesn't have a -exec or equivalent). ________________________________________________________ Robert McWilliam [EMAIL PROTECTED] www.ormiret.com People who think they know what they are doing are especially annoying to those of us who do. -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.kubuntu.org/UKTeam/