Setting Cron job to delete file after 24 hours

前端 未结 4 1565
再見小時候
再見小時候 2021-02-10 09:22

I read all the related questions and was unable to understand them. I am using Plesk CPanel to set cron job as it was advised by everyone.

I want to delete all files fro

4条回答
  •  情歌与酒
    2021-02-10 09:56

    it worked for me to delete in once a day

    0 0 * * * rm -rf /home/user/public_html/folder
    

    if you want to remove everything in this folder, but leave the folder itself:

    0 0 * * * rm -f /home/user/public_html/folder/*
    

提交回复
热议问题