Let the log automatically rotated when the size is over 100M. You can simply create a file under /etc/logrotate.d, and write the contact of file as below:
for example , edit a file named 'oracle' in the /etc/logrotate.d :
/u01/product/oracle/network/log/*.log {
notifempty
missingok
size 100m
rotate 5
copytruncate
}
/u01/product/admin/*/bdump/alert_*.log {
notifempty
missingok
size 100m
rotate 5
copytruncate
}
/u01/run/log/*.log {
notifempty
missingok
size 100m
rotate 5
copytruncate
}
/u01/run/log/*.err {
notifempty
missingok
size 100m
rotate 5
copytruncate
}
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-629872/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/35489/viewspace-629872/