Clam AntivirusはLinuxで自動スキャンをスケジュールしますか?

Clam AntivirusはLinuxで自動スキャンをスケジュールしますか?

専門家の助けが必要です。 Clam Antivirusをどのように実行しますか(https://www.clamav.net/)Linuxシステムは特定の時間に自動的にスキャンします。これを行う方法がわかりません。 crontabを作成する必要がありますか、またはClam Antivirusで使用できる設定はありますか?

ベストアンサー1

クローンタブを使用できます。個人的な好みは、cronが呼び出すカスタムスクリプトを作成し、それを実行してプロセス内のログファイルを作成することです。

#! /bin/bash
scantime=$(date -u +%H) 
#writes hour of scan, assuming to be run every 6 hours
fileout="$HOME/clamav-$(date -u +'%Hh-%d-%Y').log"

path="/var $HOME/Downloads"

for i in $path; do
    echo "Starting hourly scan of $i
    clamscan -r --bell -i $i >> $fileout
    wait
done

次に追加すると、0 0 0/6 1/1 * ? * /path/to/script6crontab -e時間ごとにスクリプトが実行されます。

おすすめ記事