find: incomplete statement
am 25.10.2007 23:30:07 von heylow
I can execute the following command on local machine:
find / -user 10002 -exec chown 35645 {} \;
I am trying to do the following
I got the following error
"find: incomplete statement"
I even tried
rsh ba123 /usr/bin/find / -user 10002 -exec chown 35645 {} \;
I got the same problem.
What I am doing wrong? Any fixes? Thanks.
Re: find: incomplete statement
am 25.10.2007 23:34:51 von Stephane CHAZELAS
2007-10-25, 21:30(-00), heylow:
> I can execute the following command on local machine:
>
> find / -user 10002 -exec chown 35645 {} \;
>
> I am trying to do the following
>
>
> I got the following error
>
> "find: incomplete statement"
>
> I even tried
> rsh ba123 /usr/bin/find / -user 10002 -exec chown 35645 {} \;
>
> I got the same problem.
>
> What I am doing wrong? Any fixes? Thanks.
rsh calls a shell on the remote machine and tells it to
interpret a command line that is a concatenation of the
arguments passed to "rsh machine". So in
> rsh ba123 /usr/bin/find / -user 10002 -exec chown 35645 {} \;
It asks a shell on ba123 to interpret:
"/usr/bin/find / -user 10002 -exec chown 35645 {} ;"
What that means is that you need to escape ";" twice. Once for
the local shell and once for the remote one:
rsh ba123 '/usr/bin/find / -user 10002 -exec chown 35645 {} \;'
or
rsh ba123 /usr/bin/find / -user 10002 -exec chown 35645 {} \\\;
for instance.
--
Stéphane
Re: find: incomplete statement
am 26.10.2007 01:17:19 von heylow
On Oct 25, 5:34 pm, Stephane CHAZELAS wrote:
> 2007-10-25, 21:30(-00), heylow:
>
>
>
> > I can execute the following command on local machine:
>
> > find / -user 10002 -exec chown 35645 {} \;
>
> > I am trying to do the following
>
> > I got the following error
>
> > "find: incomplete statement"
>
> > I even tried
> > rsh ba123 /usr/bin/find / -user 10002 -exec chown 35645 {} \;
>
> > I got the same problem.
>
> > What I am doing wrong? Any fixes? Thanks.
>
> rsh calls a shell on the remote machine and tells it to
> interpret a command line that is a concatenation of the
> arguments passed to "rsh machine". So in
>
> > rsh ba123 /usr/bin/find / -user 10002 -exec chown 35645 {} \;
>
> It asks a shell on ba123 to interpret:
>
> "/usr/bin/find / -user 10002 -exec chown 35645 {} ;"
>
> What that means is that you need to escape ";" twice. Once for
> the local shell and once for the remote one:
>
> rsh ba123 '/usr/bin/find / -user 10002 -exec chown 35645 {} \;'
> or
> rsh ba123 /usr/bin/find / -user 10002 -exec chown 35645 {} \\\;
> for instance.
Thank you, St=E9phane.