Score:0

How to scan automatically with ClamTk?

bd flag

I'm using following command to scan my notebook with Clam, however, I'm curious about if there is a command that automatically set a scan time with ClamTk.

I learned the following command from a video, and thanks to him this helped my efforts a lot. But I'm running this command every time before I close my notebook. I want it to scan automatically if it is possible time to time, like 2 days in a week at a certain times when I open my notebook.

By the way, I installed clam-daemon, and I think this is the one which works automatically, but I can't find it in system monitor. How can I know if it is working? Because I got no problem while installing it.

The command I'm using:

clamscan -r --move /home/myusername/Quarantine /home

I'm newbie to Ubuntu and its commands, terminal thingies. The reason I'm using is that it is faster than Wİndows 11 on my device (Lenovo Ideapad 1), and I'm still learning. Thanks in advance.

Best Regards,

cn flag
"'m newbie to Ubuntu" well I am not and i can tell you the best thing to do is to remove clam. it is useless and will only report false positives. stick to basic Linux common sense (good password, always update, don't install from untrusted sources) and you will not get into problems. Clam uses issues found in WINDOWS to scan Linux files using those windows rules and that wil never work. The only reason for using it is in a server setup where Linux is used as a gateway and you want to scan windows files before sending to indows PCs. and there are better, less exepnsive methods to do that.
Score:1
cn flag

like 2 days in a week at a certain times when I open my notebook.

If you want to always execute something use /etc/crontab. It has 5 elements for specifying a moment, a user, and a command to execute. crontab.guru/ is a website where you can check crontab rules.

You can use vim or nano to edit (vim /etc/crontab and add

0 1 * * 2,5  rinzwind /usr/bin/clamscan -r --move /home/myusername/Quarantine /home

(assuming it is in /usr/bin) and it would run this with user rinzwind at 1AM on weekdays 2 and 5 (sun=0, so these 2 are tue and fri) -if the machine is on-.

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,f
ri,sat
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || { cd / && run-parts --repor
t /etc/cron.daily; }
47 6    * * 7   root    test -x /usr/sbin/anacron || { cd / && run-parts --repor
t /etc/cron.weekly; }
52 6    1 * *   root    test -x /usr/sbin/anacron || { cd / && run-parts --repor
t /etc/cron.monthly; }
Score:0
it flag

Read https://help.ubuntu.com/community/ClamAV

But, be aware that the Clam Anti Virus tool scans files or incoming email messages for Windows Virus signatures.

By design, Unix/Linux is not affected by Windows Virii. They don't run on Linux, the tricks used to subvert Windows do not affect Unix/Linux.

Unless you are running a mail server, with Windows clients, I suggest abandoning your ClamAV quest.

Effort put into investigation of "securing Ubuntu" with your favorite search engine will give better results.

Be sure to fully understand any command or set of commands you see on the internet (man) everything FIRST.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.