On 22 Jan 2009 at 14:54, Morris, Roy wrote:

> I know this is more of a general 'huh' kind of thing, but I figured someone
> could kick start my brain for me. Anyone know why this doesn't work? It
> appears to find the files ok but the -exec part thinks it can't?
> 
> 
> spider:/var/log# find . -name "daemon.*.gz" -exec "echo {}" \;
> find: echo ./daemon.2.gz: No such file or directory
> find: echo ./daemon.1.gz: No such file or directory
> find: echo ./daemon.5.gz: No such file or directory
> find: echo ./daemon.4.gz: No such file or directory
> find: echo ./daemon.3.gz: No such file or directory
> find: echo ./daemon.0.gz: No such file or directory
> 
> 

specifying "echo {}" -- i.e. putting both `words' in the same set of 
quotes -- you made it a single token as far as the find command is 
concerned, which is what it passes to the exec call.

Reply via email to