Under linux regularly delete the specified folder File 2 days ago

vi scriptable delete-log.sh
follows:
Find / Home / ctbackup / -name orabackup- -mtime +2 -exec RM -rf {} \;
Find / Home / ctbackup / -name OilDaQingAllinoneM- -mtime +2
-exec rm -rf {} \;

Set the script execution time: 3:00 daily execution of the script command
crontab -e
0 3 * /home/delete-log.sh
Under linux regularly delete the specified folder File 2 days ago

Guess you like

Origin blog.51cto.com/sunrc/2437626