deleting old files using crontab

后端 未结 3 595
难免孤独
难免孤独 2020-12-09 20:12

I use the following crontab record in order to daily backup my DB:

0 2 * * * MYSQL_PWD=password mysqldump -u user db_name > $HOME/db_backups/db_name-$(dat         


        
3条回答
  •  佛祖请我去吃肉
    2020-12-09 21:00

    There is a tool called tmpreaper that securely deletes files matching certain criteria, such as an access or modification date n days in the past.

提交回复
热议问题