Skip to main content

delete old cached files by cpanel cronjob

Comments

3 comments

  • GOT
    You can add this cron as root with crontab -e 0 4 * * * find /path/to/files* -mtime +7 --delete This will at 4 am every day delete the files in the path older than seven days.
    0
  • cPanelLauren
    You can add this to the cPanel interface for the account you're wanting to delete the cache files for. You do want to be careful you're only deleting the cache files specifically as well.
    0
  • quietFinn
    I would suggest using this command: find /path/to/files -type f -mtime +7 -exec rm -f {} \;
    0

Please sign in to leave a comment.