Greetings:
Need to delete .jpg files that are accumulating in a specific folder. The files are not needed and are taking up GB's of space if not deleted regularly. Plan to run the script once daily at 3:00AM and delete files older than 1 day.
Here is the script which I think will do the trick. Can someone confirm or advise with corrections?
find /home/mydomain/public_html/top_folder/folder/*.jpg -mtime +1 -exec rm {} \;
Thanks to anyone helping!
Need to delete .jpg files that are accumulating in a specific folder. The files are not needed and are taking up GB's of space if not deleted regularly. Plan to run the script once daily at 3:00AM and delete files older than 1 day.
Here is the script which I think will do the trick. Can someone confirm or advise with corrections?
find /home/mydomain/public_html/top_folder/folder/*.jpg -mtime +1 -exec rm {} \;
Thanks to anyone helping!