Code:
find /tmp/test -ctime +60 -delete
The above command will delete any files created over 60 days ago in the /tmp/test folder (and all subfolders).
You can add this to a cron job and it will be automatic daily, weekly, monthly
find /tmp/test -ctime +60 -delete
The above command will delete any files created over 60 days ago in the /tmp/test folder (and all subfolders).
You can add this to a cron job and it will be automatic daily, weekly, monthly