Thanks for the help, however I must still be in stupid mode doh!
the original command works but as soon as I add the rest of the
command it dies. Basically what I am trying to do is go through
three years worth of pflogs in gzip format and grep for a part
of an ip address. It works on a command line, on a single file
but when used with 'find -exec' it yaks. I am sure it's got
something to do with the way I am quoting but it's not making
a lot of sense at this point.

Here is the actual command I am trying to run and it's error
output.

spider:/var/logtransfer/dc-fw1# find . -name pflog.*.gz -exec zcat {} |
tcpdump -entttv -r -  \;
find: -exec: no terminating ";"
tcpdump: fread: Invalid argument



-----Original Message-----
From: [email protected] [mailto:[email protected]]on Behalf Of
John Jackson
Sent: Thursday, January 22, 2009 3:12 PM
To: [email protected]
Subject: Re: Find - Sillyness


On Thu, Jan 22, 2009 at 02:54:21PM -0500, 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
>

Try:

find . -name "daemon.*.gz" -exec echo {} \;

without the double quotes after exec.

John

Reply via email to