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.confOpen freshclam.conf and comment the "Example" (in new version it may be "FooClam") line:
# Comment or remove the line below.
# Example
Update database:
$ freshclamRun scan on all your files:
$ clamscan -r --bell -i /
brew link clamavfails on macOS High Sierra.Had to run following commands to get ClamAV working:
sudo mkdir /usr/local/sbinsudo chown -R $(whoami) $(brew --prefix)/*(standard brew fix does not work anymore on OS X 10.13)brew link clamav