How to exclude .jpg, .jpeg, .png, .gif from a ClamAV Scan (clamscan)
7,281
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
.
Related videos on Youtube
Author by
Rui F Ribeiro
Updated on September 18, 2022Comments
-
Rui F Ribeiro almost 2 years
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.
-
Luka about 5 yearsis it case sensitive?
-
Luka about 5 years
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 withclamscan -ri
haha, silly me.