Hi,
I'm relatively new to OMV but have managed to use these forums to answer most of the questions I've had so far. Despite a lot of attempts, I simply can't get a scheduled job working that will delete files older than 'x number of days'. My setup is a HP N54L with OMV 4.1.11 (Arrakis).
I have an IP security camera sending photos and short video clips to a shared folder on the server. Obviously these files build up over time and are of little use once they are a few days old. Currently I delete these files manually every so often. I have searched google and these forums for a solution, so far I have tried creating a scheduled job using the following commands:
find /sharedfolders/C********e -mtime +1 -exec rm {} \;
find /sharedfolders/C********e -mtime +1 -type f -delete
The above commands both returned errors stating that the folder location could not be found. Then I tried:
find /srv/dev-disk-by-label-S*****E/C******Y -type f -mtime +1 -exec rm {} \;
find /srv/dev-disk-by-label-S*****E/C******Y -mtime +1 -type f -delete
Then I noticed I had not been adding a '/' to the end of my file path, so tried the following two variants:
find /srv/dev-disk-by-label-S*******E/C******Y/ -type f -mtime +1 -exec rm {} \;
find /srv/dev-disk-by-label-S*******E/C******Y/ -mtime +1 -type f -delete
All of the above four commands ran without any errors, however when I test them by running the command (execute cron job) all I see is a brief "please wait" dialogue and ultimately no files are deleted. All scheduled jobs are run using the root user.
I think the issue is probably related to my lack of understanding about Linux folder structures, but I've been unable to resolve this through searching alone.
Any help that forum members could provide would be most appreciated.
Thanks