I'm running a clamscan command to scan my users home directories, I'd like to exclude images from the scan as these sites specifically have thousands of images.
Asked
Active
Viewed 8,183 times
1 Answers
12
clamscan --exclude='\\.(jpg|jpeg|png|gif)$'
\\.is the.in the file extension.(jpg|jpeg|png|gif)matches any of those strings.$pins the search to the end of the line.
This, therefore, should exclude all files ending in .jpg, .jpeg, .png, and .gif.
Kusalananda
- 320,670
- 36
- 633
- 936
Michael Grant
- 413
- 2
- 5
-
is it case sensitive? – Luka May 15 '19 at 19:10
-
`Case-Insensitive [i] Specifying the i modifier causes ClamAV to match all alphabetic hex bytes as case-insensitive. All patterns in ClamAV are case-sensitive by default.` I always run with `clamscan -ri` haha, silly me. – Luka May 15 '19 at 19:17