Running a VPS with Ubuntu 12.04.5 LTS. Noticed a spike in disk usage.
Turns out the culprit is lastlog. Overwrote it with >/var/log/lastlog
.
After logging out of the session and logging back in, lastlog increases in size again:
-rw-rw-r-- 1 root utmp 4.2G May 5 06:32 /var/log/lastlog
Is this something known? How can I stop lastlog from using up so much space?
Thank you!
tail /var/log/lastlog
. That'll show the last 10 lines of the log. If 10 lines isn't enough, trytail -n NUM /var/log/lastlog
, where NUM is the number of lines from the bottom you want to show.