[ubuntu-uk] rsync chgrp problem - advice, please?
Tony Arnold
tony.arnold at manchester.ac.uk
Thu Jun 7 09:45:10 BST 2007
Robert,
Robert McWilliam wrote:
> On Thu, 07 Jun 2007 08:45:48 +0100
> Tony Arnold <tony.arnold at manchester.ac.uk> wrote:
>> Try this instead:
>>
>> find ~/music -group diana -exec chgrp root {} && chmod 664 {} \;
>>
>
> That wont work - the shell sees the && and terminates the command there
> than tries to chmod {}. It might work with a \&\& (I haven't tried it
> though).
Doh! Obvious now you point it out:-)
>> I'm pretty sure the first \; terminates the whole find command.
>>
>
> It doesn't I tried it before posting as using && in the one exec was my
> first thought.
Thanks. I never did quite understand why the ; had to be escaped. It all
makes sense now!
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