I am trying to empty my
syslog.1 file which was flooded with some messages and has the size of 77 GB. I did
sudo truncate -s 0 /var/log/syslog.1
but the command is taking more than 2 hours to return. Is it safe to stop it by Ctrl-C or by the
kill command? I am afraid that these methods may cause inconsistency in the file system. Is there a better way?
The system is Ubuntu 16.04. The root partition where
/var/log/syslog.1 sits is almost full due to the sudden increase in size of this file as well as
/var/log/kern.log. The latter files are still continuing to grow, but the command line is still responsive.
Go to Source