How to delete automaticaly file older than 30 day in redhat linux

1. open crontab -> crontab -e

2. add this script "30 * * * * find /path/to/dir -type f -min +30 -exec rm -f {} \;" 

3. save crontab and exit


this script will automaticaly running every 30 minutes

Posting Komentar

Lebih baru Lebih lama