Hello, You can use the --exclude-dir= option and indicate what you want to exclude from the scan process.
Regards. Sorin Petrut Niculae [cid:image009.jpg@01D4C7AC.7C1B4010] P Please consider the environment before printing this e-mail. De: clamav-users [mailto:clamav-users-boun...@lists.clamav.net] En nombre de Christian Enviado el: lunes, 26 de abril de 2021 15:15 Para: clamav-users@lists.clamav.net Asunto: [clamav-users] How to scan a single partition Hi altogether, My system is Linux/Lubuntu 20.04.2 LTS, 64 bit. I have three partitions: root-, home- and a third (data-)partition with 23 GB, 36 GB and 193 GB respectively plus 3 usb-sticks: df -h Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf udev 1,9G 0 1,9G 0% /dev tmpfs 386M 1,8M 384M 1% /run /dev/sdc1 23G 13G 9,4G 58% / # root partition tmpfs 1,9G 0 1,9G 0% /dev/shm tmpfs 5,0M 8,0K 5,0M 1% /run/lock tmpfs 1,9G 0 1,9G 0% /sys/fs/cgroup /dev/sdc2 36G 22G 12G 64% /home # home partition tmpfs 386M 12K 386M 1% /run/user/1000 /dev/sdf1 7,5G 2,1G 5,4G 29% /media/rosika/A492-CD29 # usb-stick 1 /dev/sdd1 30G 26G 4,1G 87% /media/rosika/28BC-DAFC # usb-stick 2 /dev/sdc3 193G 99G 84G 55% /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1 # 3rd partition (data-partition) /dev/sdb 30G 26G 3,9G 87% /media/rosika/74C1-30C7 # usb-stick 3 What I want to do is: scan the root-partition exclusively, not the other ones and not the sticks. What command would I need for this? Looking around on the web I found this command (https://pikedom.com/clam-anti-virus-on-arch-linux/<https://urldefense.com/v3/__https:/pikedom.com/clam-anti-virus-on-arch-linux/__;!!MvyJQugb!UTh6PNfhWdejMB2D2RnSbIP71nosYbh3kI0IwKzHttlCCE8FeJ1WQN7iSW3K$> ): clamscan --recursive --infected --exclude-dir='^/sys|^/dev|^/proc|^/var/lib/clamav' --max-filesize=4000M --max-scansize=4000M / -l ~/clamav-scan-results/201803261436 As the starting point is / this would scan everything, right? Which is not what I want to achieve. Thanks for your help in advance. Many greetings. Rosika P Please consider the environment before printing this e-mail.
_______________________________________________ clamav-users mailing list clamav-users@lists.clamav.net https://lists.clamav.net/mailman/listinfo/clamav-users Help us build a comprehensive ClamAV guide: https://github.com/vrtadmin/clamav-faq http://www.clamav.net/contact.html#ml