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

Robert McWilliam rmcw at allmail.net
Thu Jun 7 08:38:16 BST 2007

On Thu, 07 Jun 2007 08:27:32 +0100
luxxius <luxxius at googlemail.com> 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'
> Any thoughts?

-exec wants a command ended with a semi-colon (which you have to escape
to stop the shell interpreting it). Make sure you have a "\;" at the
end of each of the -exec commands. 

The other thing I can think of is the copy/pasting the above command
into a terminal will not work because of the line break, so the end of
the -exec chmod wont be seen.

Robert McWilliam     rmcw at allmail.net    www.ormiret.com

Most Annoying thing to McDonald's employees: I would like a plain
cheeseburger with ketchup and no cheese.

More information about the ubuntu-uk mailing list