View Single Post
sutaburosu's Avatar
Posts: 79 | Thanked: 47 times | Joined on Oct 2010 @ Devon, UK
#14
You'll need to grant the 'user' user permission to write to it first, with 'chmod o+rw /var/log/syslog' as root.
You should then be able to empty it with 'echo "" > /var/log/syslog' in your crontab.
Restarting syslog shouldn't be necessary with this technique. If you find it still isn't happy, most (all?) syslog daemons will reopen the log upon receiving the HangUP signal: kill -HUP `pidof syslogd`
 

The Following 2 Users Say Thank You to sutaburosu For This Useful Post: