On Tue, 2013-09-03 at 17:57 -0400, monte olvera wrote:
> I'm running clamav 0.97.3 (I know it's old, working on that) on Linux. I
> want to exclude files (via clamd) based on a regex and can't seem to
> figure out how. I can ignore paths just fine (ExcludePath ^/tmp) but I
> want to ignore all log files. I've tried many different variations of
> the following, including ones not listed and can't seem to get antying
> working.  Can someone please tell me how I can scan the root filesystem
> and ignore all files appended with a ".log"?
> 
> Some of what I've tried, which have all failed.
> 
> ExcludePath ^*log
> ExcludePath ^.*log
> ExcludePath ^*.log
> ExcludePath ^/.*log
> ExcludePath ^/*.log

In my regex/sed/other_matching experience

The Caret Character  "^" means the literal beginning of a line.

The Dollar Character "$" means the literal end of a line.

The Backslash Character "\" is an escaping character. This means it
takes away the special meaning of the next character. So that if you had
an actual file with a Asterisk Character in it, such as "*log", you
could specify the file name "\*log" and it would match that. Of course
to get an actual backslash character you'd need to escape the escaping
character "\\" would be a single backslash

So, if you don't be careful you will be excluding either far more or far
less than you think.

I'd point you to a regex/sed/awk/pattern_matching tutorial but that
would be condescending and I really don't think you need that either!
But, just so you don't think I'm snooty, I go back through them
regularly when I get confabulated on how things work in them... because
sometimes there is just to much to remember.

Cheers.
-- 
greg folkert - systems administration and support
web:    donor.com
email:  g...@donor.com
phone:  877-751-3300 x416
direct: 616-328-6449 (direct dial and fax)
"Wherever you go, go with all your heart."
    -- Confucius

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to