Remove the quotes from "echo {}". The "No such file or directory" error
is because find cannot run a program named "echo ./daemon.2.gz". Remove
the quotes and it will try to run "echo" with an argument
of "daemon.2.gz".
On Thursday January 22 2009 13:54, you 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
--
------------------------------------------------------------------------
Dan Ramaley Dial Center 118, Drake University
Network Programmer/Analyst 2407 Carpenter Ave
+1 515 271-4540 Des Moines IA 50311 USA