I need to check a directory and subfolders every hour, but only for new files.
So i wrote a script with these contents:
#!/bin/bash
find /var/www/html/files/ -ctime -1 |
clamscan -r --remove --log=/var/log/clam/clamscan.log
But for a reason, it doesn't check only the new files, it checks every file (about 6000).
The funny thing is, when I'm for example in the /tmp/ folder and I run find -ctime -1 | clamscan
it works.
So I guess I'm missing something but I can't think of what it is.