How to scan all files Created/Modified in the last X days
How to scan all files Created/Modified in the last X days
It is possible to scan files created/modified in the last X days (Recently modified/created files) using Maldet malware scanner. Some sites might be hacked two or three days so there is no need to scan the whole website/server, instead you can scan files that are created/modified three days ago.
Command Usage :
OR
maldet -r DIRECTORYPATH DAYS
By default –scan-recent without specifying any days will scan the files Created/Modified in the last 7 days(1 Week). wildcards can be used in the scan command
The above command will scan public_html of all cPanel accounts, only files Created/Modified in the last 7 days will be scanned.
OR
root@server [/]# maldet –scan-recent /home/?/public_html 3
The above command will scan only files Created/Modified in the last 3 days.
It will take long time to scan websites with GB of data, the above command saves time by scanning only recently modified files.
Some infected files might not be detected by Maldet malware scanner so check the access_log of the website to get list of files Created/Modified recently.