[clamav-users] clamscan : correct syntax : exclude Directory

ellanios82 ellanios82 at gmail.com
Thu Jun 12 20:14:10 UTC 2014


On 06/12/2014 10:29 PM, Kevin Lin wrote:
> The "--exclude-dir" option to clamscan takes a regex argument that tells
> clamscan to exclude the directories that match the regex.
>
> This means that specifying:
>
> *--exclude-dir=BTC*
>
> will exclude all directories whose absolute path that match BTC (e.g.
> "/some/directory/BTC", "/BTC", "/some/directory/helloBTC",
> "/some/directory/somethingBTCsomething", "/BTC/some/other/directory)
>
> *--exclude-dir=/BTC*
>
> will exclude all directories that exclusively start with BTC as the regex
> matches against the absolute directory address (e.g. "/BTC",
> "/some/directory/BTC", "something/BTCsomething/something)
>
> If you want to exclude a very specific directory from the clamscan, you
> would want to use the absolute path to the directory to minimize the number
> of regex matches and marking the start and end of the regex accordingly.
>
> So for the case of "/BTC" which I am assuming is the absolute path to
> your Bitcoin
> Directory which you wish to exclude. I would use the command:
>
> *clamscan --recursive=yes --exclude-dir=^/BTC$*
>
> Note the usage of '^' and '$' to force the regex to only match the "/BTC"
> directory.
>
> For further information on clamscan options, you can refer to the clamscan
> man page or run*clamscan --help*.
__________

  - many thanks
  regards
   Ellan





More information about the clamav-users mailing list