Answers for "logrotate"

0

logrotate

# Specify the dir that you would like to rotate in the first line.
# You can use daily, weekly or monthly rotation
# On 'rotate' section you can define how many days the log will be kept.

/home/ubuntu/log_dir/* {
    daily
    rotate 7
    size 100M
    compress    
    dateext
    dateformat -%d%m%Y
}
Posted by: Guest on October-27-2020

Browse Popular Code Answers by Language