[ubuntu-uk] rsync chgrp problem - advice, please?

Tony Arnold tony.arnold at manchester.ac.uk
Thu Jun 7 08:45:48 BST 2007


Diana,

luxxius wrote:
> Robert McWilliam wrote:
>> find can be used to run commands:
>>
>> 	find ~/music -group diana -exec chgrp root {} \; -exec chmod
>> 		664 {} \;
> 
> 
> Robert >>> This seems almost to work, as it seems to get round the 
> 'spaces in filenames' problem that the loop solution runs into.  But I 
> get the error
> 
> find: missing argument to `-exec'

Try this instead:

find ~/music -group diana -exec chgrp root {} && chmod 664 {} \;

I'm pretty sure the first \; terminates the whole find command.

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: tony.arnold at manchester.ac.uk, H: http://www.man.ac.uk/Tony.Arnold



More information about the ubuntu-uk mailing list