[ubuntu-uk] rsync chgrp problem - advice, please?
matthew at truthisfreedom.org.uk
Thu Jun 7 07:52:37 BST 2007
On Thu, 07 Jun 2007 07:45:23 +0100, Tony Arnold <tony.arnold at manchester.ac.uk> wrote:
> Matthew Macdonald-Wallace wrote:
>> On Thu, 07 Jun 2007 07:02:06 +0100, luxxius <luxxius at googlemail.com>
>>> Neil Greenwood wrote:
>>>> 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)
>> 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...
More information about the ubuntu-uk