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)

Regards,
Tony.
-- 
Tony Arnold, IT Security Coordinator, University of Manchester,
IT Services Division, Kilburn Building, Oxford Road, Manchester M13 9PL.
T: +44 (0)161 275 6093, F: +44 (0)870 136 1004, M: +44 (0)773 330 0039
E: [EMAIL PROTECTED], H: http://www.man.ac.uk/Tony.Arnold

-- 
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.kubuntu.org/UKTeam/

Reply via email to