Sophos Anti-Virus for UNIX/Linux: exclusion handling
Files, directories and filesystems can be excluded and included in Sophos
For more on exclusions, see the knowledgebase article on the
What to do
-exclude
You can use
For example
sweep fred/home harry/home -exclude tom/home peter/home
will scan fred/home and harry/home, but not tom/home or peter/home.
-include
Any items following the command line option
Using -exclude and -include together
Both -exclude and -include can be used in the same set of commands.
For example
sweep fred/home harry/home -exclude tom/home peter/home -include bill/home
scans items fred/home, harry/home and bill/home and all their contents. It does not scan tom/home or peter/home.
Subdirectories
The option -exclude can be used to exclude files or directories under another directory. For example
sweep /home/fred -exclude /home/fred/games
will scan all of Fred's home directory except for the directory games and all directories and files under it.
The option
sweep /home/fred -exclude /home/fred/games -include /home/fred/games/chess
will scan all of the directory /home/fred except /home/fred/games, but will also scan /home/fred/games/chess. The order of the command line qualifiers is not important, the command
sweep /home/fred -include /home/fred/games/chess -exclude /home/fred/games
scans exactly the same files as the first example.
Specifying an exclusion list as a file
Items to be scanned can be specified in an "arguments file" as well as command line. Use the command line option
This file can also include a list of items to exclude, using the option
If you need more information or guidance, then please contact technical support.
- Article ID: 10469
- Created: 4 Mar 2004
- Last updated: 8 Mar 2006
