On 9/24/07, McGlynn, Sean (DOB) <[EMAIL PROTECTED]> wrote:
> Rob,
>
> Thank you for your reply.
>
> So to be clear, cron is calling a script (below). I assume even though
> cron is calling a script, rather than the individual commands in the
> script, your same suggestion applies? If so, would it be a matter of
> adding 1>/dev/null to the end of each line? I'm somewhat new to Linux,
> so forgive my elementary queries. Thank you.
The easiest approach is to append the following to the line in cron
(so you can run the script interactively and see the output):
">/dev/null 2>/dev/null"
Alternatively, replace your script with the following:
>>>>>
#!/bin/sh
PARTITIONS="/ /_admin /bin /boot /etc /lib /mnt /opt /sbin /srv /tmp /usr /var"
for PARTITION in ${PARTITIONS}
do
clamscan -r --move=/var/log/clam/infected -l
/var/log/clam/dailyclamscan ${PARTITION} >/dev/null 2>&1
done
<<<<<
Much easier to change where the output is directed now :)
If you simply want to scan all disk partitions replace the second line with:
PARTITIONS=`df -lP | grep ^/`
That will list all the mounted disk partitions that are local to the
host in question.
--
Please keep list traffic on the list.
Rob MacGregor
Whoever fights monsters should see to it that in the process he
doesn't become a monster. Friedrich Nietzsche
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html