Instantly share code, notes, and snippets.

Embed
What would you like to do?
scan virus in whole system by clamav (clamscan) and save log by date
#!/usr/bin/env bash
DATE=`date '+%Y-%m-%d'`
LOG_PATH="/var/log/clamav"
# create log folder
mkdir -p $LOG_PATH
clamscan -i -r / 2>&1 | tee "$LOG_PATH/$DATE.log"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment