Rob,

Thank you again for taking the time to reply, and for providing two
useful alternative.  The first worked perfectly, and I believe I'll try
the second as it would be a much simpler script over all.

Thanks again.

Sean 


--------------------------------------------------------
This e-mail, including any attachments, may be confidential, privileged or 
otherwise legally protected. If you have received this e-mail in error, or from 
someone who was not authorized to send it to you, do not disseminate, copy or 
otherwise use this e-mail or its attachments. Please notify the sender 
immediately if you have received this e-mail by mistake, and delete it from 
your system.



-----Original Message-----

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rob
MacGregor
Sent: Monday, September 24, 2007 10:06 AM
To: ClamAV users ML
Subject: Re: [Clamav-users] Logging to /var/spool/mail/root

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

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html

Reply via email to