[clamav-users] clamdscan: Output detailed scan results to STDOUT or to configurable file?

An Schall an.schall at gmail.com
Thu Feb 17 13:08:45 UTC 2022


When using clamdscan, I would like to have verbose output logged to a
file. Specifically, the timestamp, file path and file name as well as
the scan results should be logged to a specified file.

In comparison, clamscan outputs this information to STDOUT per default
and I could simply pipe it to "tee -a $LOG_FILE".

Unfortunately, clamdscan does not output this information but logs
this kind of information to /var/log/clamd.scan. However, given that I
would like to use it within a script, I would like to log this kind of
output to a configurable file.

While there is a -L switch, it does not include such detailed
information (only the summary). Also, there seems to be a --stdout
switch but it seems it does not help either.

How can I get verbose information from /var/log/clamd.scan to a
configurable file in the first place?

Thanks in advance!


More information about the clamav-users mailing list