| Version 4 (modified by , 4 years ago) (diff) |
|---|
Logrotate
[krit@Mosh ~]$ more /etc/logrotate.d/actdaslog
/tmp/ActDasLog/*.log
{
su krit krit
#size 500k
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
touch /tmp/ActDasLog/mosq_feed_actDas_11_firmware.log
chown krit:krit /tmp/ActDasLog/mosq_feed_actDas_11_firmware.log
endscript
}
To run the logroate file with -f force option
[root@Mosh logrotate.d]# logrotate -f /etc/logrotate.d/actdaslog --state /tmp/logrotate-state --verbose
After run we should see
[krit@Mosh ActDasLog]$ tree /tmp/ActDasLog/ /tmp/ActDasLog/ ├── mosq_feed_actDas_11_firmware.log ├── mosq_feed_actDas_11_firmware.log.1 ├── mosq_feed_actDas_11_firmware.log.2.gz ├── mosq_feed_actDas_11_firmware.log.3.gz └── mosq_feed_actDas_11_firmware.log.4.gz 0 directories, 5 files [krit@Mosh ActDasLog]$
![(please configure the [header_logo] section in trac.ini)](/Utils/chrome/site/your_project_logo.png)