Why is the lastlog file on my server so large?

Question

In the log directory of your server you may notice a file named lastlog that appears quite large:

# ls -l /var/log
...
-rw-r--r--. 1 root root    1468760063212 May 31 10:41 lastlog
...

Why is this file taking up so much space?

Answer

The file is a sparse file and is not actually taking up as much physical space as it shows. lastlog records the last login of each user. The large size merely shows you the potential size of the file if there were a maximum amount of users (around 2^32 users).

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk