Sophos

Online support

Product maintenance

Contact support

Support services

Sophos Anti-Virus for Mac OS X: using Sophos Anti-Virus via Terminal

You can run on-demand scans via Terminal, Mac OS X's command line interface.

Examples of what can be done include running scheduled scans with cron.

What to do

Opening Terminal

  1. In a Finder window, click 'Applications'.
  2. Click 'Utilities'.
  3. Double-click 'Terminal' to open Terminal.

Running a command line scan in Terminal

To scan the local computer, type

sweep /

To scan a particular directory or file, use the path of the item to be scanned. For example

sweep /usr/mydirectory/myfile

To remove infected files, use the -remove option. For example, to remove all infected files on the local computer, type

sweep / -remove

To disinfect files use the -di option. For example, to disinfect all infected data files in a particular directory or file, type

sweep /usr/mydirectory/myfile -di

For more information

For a complete list of all command line options that can be used with the sweep command, type

sweep -h

If you need more information or guidance, then please contact technical support.