Note: on legacy intel system the path may be /usr/local/etc/clamav instead of /opt/homebrew/etc/clamav/
$ brew install clamav
$ cd /opt/homebrew/etc/clamav/
$ cp freshclam.conf.sample freshclam.conf
Open freshclam.conf and comment the "Example" (in new version it may be "FooClam") line:
# Comment or remove the line below.
# Example
Update database:
$ freshclam
Run scan on all your files:
$ clamscan -r --bell -i /
brew link clamav
fails on macOS High Sierra.Had to run following commands to get ClamAV working:
sudo mkdir /usr/local/sbin
sudo chown -R $(whoami) $(brew --prefix)/*
(standard brew fix does not work anymore on OS X 10.13)brew link clamav