Thanks you Tilman.

>From what I understand, xargs passes the command line arguments in
batches, launching clamscan once for each batch.


Veselin



On Tue, Aug 19, 2008 at 11:41:18AM +0200, Tilman Schmidt wrote:
> Veselin Kantsev schrieb:
>> I have a script that finds files that have been modified in the last
>> N days from a folder and then passes the list to clamscan.
>>
>> I'm using "cat LIST.txt | xargs -0 clamscan -ir --stdout >> REPORT.txt"
>>
>> When the scan is finished the report looks like this:
>>
>> ----------- SCAN SUMMARY -----------
>> Known viruses: 396676
>> Engine version: 0.93.1
>> Scanned directories: 0
>> Scanned files: 684
>> Infected files: 0
>> Data scanned: 440.22 MB
>> Time: 51.853 sec (0 m 51 s)
>>
>> ----------- SCAN SUMMARY -----------
>> Known viruses: 396676
>> Engine version: 0.93.1
>> Scanned directories: 0
>> Scanned files: 86
>> Infected files: 0
>> Data scanned: 41.97 MB
>> Time: 6.677 sec (0 m 6 s)
>>
>>
>> Why are there two summaries?
>
> Because the xargs command in your script ran clamscan twice.
>
>> Sometimes when I'm searching for files in multiple folders there is even
>> more summaries generated.
>
> That's how xargs works. See "man xargs".
>
> HTH
> T.
>
> -- 
> Tilman Schmidt
> Phoenix Software GmbH
> Bonn, Germany
>



> _______________________________________________
> Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
> http://www.clamav.net/support/ml
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to