[prev in list] [next in list] [prev in thread] [next in thread] 

List:       clamav-users
Subject:    Re: [clamav-users] Is there any way for clamscan to only print infected files but also show errors?
From:       "G.W. Haywood" <ged () jubileegroup ! co ! uk>
Date:       2012-08-15 11:05:29
Message-ID: Pine.LNX.4.64.1208151152230.16668 () mail5 ! jubileegroup ! co ! uk
[Download RAW message or body]

Hi there,

On Wed, 15 Aug 2012, David Raynor wrote:

> On Tue, Aug 14, 2012 at 10:25 AM, <Carlo.DiCocco@...> wrote:
> 
> > I don't want to list every file clamscan checks (because there are many).
> > When I use the "-i" option to only print infected files, my scan summary
> > results indicate there were errors.  However, the errors are not reported
> > because the "-i" option was used.  Is there any way to only print infected
> > files but also show errors?  I have already tried outputting the stderr
> > buffer to a file, but it's empty.
> 
> I noticed that myself when trying to debug some issues earlier this year. I
> added this feature enhancement as bug #5350. With the new design, the "-o"
> command-line option will tell clamscan to suppress OK results, so that both
> infected and error results are printed. That feature will be included in
> version 0.98.

My usual solution to a problem like this is to use 'grep' to suppress any
unwanted output.  Something like

clamscan <directory> | grep -v ': OK$'

should do the trick in this case.  The enhancement is welcome of course.

The output from stderr is expected to be empty; the notification of
infected files is not an error, but the normal expected result of
scanning an infected file.  The output will be on stdout, not stderr.

Incidentally, just lately I've noticed an improvement in the response
from SourceFire on this list. :)

--

73,
Ged.
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic