auto delete old 30 days index.tar
Add a sh script which names as cleanpg.sh
in folder
/pg/cact3index/INDEXES
find /pg/cact3index/INDEXES/ -name '*.tar' -mtime +30 -type f -exec rm "{}" \;
( find in path 30days delete end)
Then change crontab to run it every Saturday morning 5:05 am
crontab -e
5 5 * * 6 /pg/cact3index/INDEXES/cleanpg.sh
crontab -l to display all job to be run
0 Comments:
Post a Comment
<< Home