I have searched around but not found a possible solution to this so far. I have an ongoing scan which I thought would've been finished at certain time, but unfortunately it has not. So I am wondering if there's a way to check the scan progress of this ongoing progress.
AFAICT, this is not possible—you can either have all scanned files printed to the console, or just print infected files. Then at the end, ClamAV will print a summary. I haven't been able to find a way to get any ongoing statistics.
The only way I could imagine hacking it to do this would be:
I tried doing this quickly one time, but couldn't get it working well enough for an automated Jenkins job I set up... so I eventually gave up on it. Sorry :(
This is an old, answered thread but I wanted to try geerlingguy's idea (whom I am a fan :-)) and in case others end up here provide a codified solution.
If you want to scan the folder foo for example, you start the scan with:
or
You can then run the following script with the arguments of the folder being scanned and the log file, in this example
Where the contents of the status.sh file is:
One could combine running of the scan and checking the status into a single script if needed.