Last active
October 29, 2018 04:49
-
-
Save johnroyer/5cfb21b3a82f8a9f0fbd1c448191fcf1 to your computer and use it in GitHub Desktop.
scan virus in whole system by clamav (clamscan) and save log by date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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