Chris Purves wrote:
Dennis Peterson wrote:
What I am actually trying to do is have clamscan only scan files that are new or have not changed since the last scan. I have gotten as far as creating a filelist containing a list of files that are new or where the md5sum has changed. The problem I have now is how to get that information to clamscan efficiently.


Try:

- Create a directory in /tmp. In that directory create soft links that reference
your files. Run clamscan on the links. Check the logs for viruses. Delete
the links. Delete the directory.

This sounded like a good idea, so I gave it a try. After spending a few hours to script the softlinks I got it to work for small file lists, but it still doesn't work for lots of files (~5000). When I run 'clamscan /tmp/clamscan/*' I get the following error:

/usr/bin/clamscan: Argument list too long

This sounds like the command line limit for the OS. The list is quite large at 5000 - for that it would probably make sense to script a Perl solution that uses the stream input to clamd via sockets. Perl can also create nice logs of the results.

dp
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html

Reply via email to