[clamav-users] clamscan - can the hostname be added to the generated scan summary report

G.W. Haywood clamav at jubileegroup.co.uk
Tue Sep 8 18:15:50 UTC 2020


Hi there,

On Tue, 8 Sep 2020, Leveille, Gerald via clamav-users wrote:

> I am a fairly new with ClamAV.  When I run a scan (ex. clamscan
> --infected --recursive /home) on a Linux Server, a Scan Summary
> report is generated, is it possible to add/generate the Host name in
> the Scan Summary so that when looking at the summary I can see the
> Host name?

This isn't strictly ClamAV stuff but if you're using the command line
on a Linux box to run a scan it's very easy to do what you want.  The
'hostname' command prints a line of text showing the hostname, so if
you give a compound command like

$ hostname ; clamscan .... /home

then the hostname will appear as the first line of the output.

You can even redirect the output(s) of the command(s) to a file, to
save the result for posterity.  Something like

$ hostname > logfile ; clamscan .... /home >>logfile

The >> is needed in the second part of the command so that the output
is appended to the file instead of overwriting it.

-- 

73,
Ged.



More information about the clamav-users mailing list