On Thu, 07 Jun 2007 07:45:23 +0100, Tony Arnold <[EMAIL PROTECTED]> wrote: > > > Matthew Macdonald-Wallace wrote: >> On Thu, 07 Jun 2007 07:02:06 +0100, luxxius <[EMAIL PROTECTED]> > wrote: >>> Neil Greenwood wrote: >>> <snip> >>>> check the group for the files that gave errors and one >>>> of the files that didn't. Change the problem files to be in the group >>>> that isn't causing problems. >>> 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? >>> >>> (I've been trying, without success, to pipe the find results, but I'm >>> struggling now. Books are fine for individual commands, but not much >>> help for creating processes or very simple scripts) >>> >>> TIA >>> -- >>> Diana >> >> >> Try (and this may need checking by others!) >> >> for i in find /home/diana/music -group diana; do chgrp root $i && chmod > 644 $i; done > > You need back quotes around the find command, viz: > > for i in `find /home/diana/music -group diana` ; do chgrp root $i && > chmod 644 $i; done > > (should be all on one line, excuse the wrap)
I knew I'd missed something out... Cheers Tony, M. -- [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.kubuntu.org/UKTeam/
