User Tools

Site Tools


linux:users_logs

This is an old revision of the document!


User logs

Lastlog

Why is the /var/log/lastlog file so large?

This file is what we call a sparse file. A sparse file is a file that contains unallocated blocks or “empty space”, as it implies, it does not actually take up filesystem space.

[root@LIN-HREL8 ~]# du -sh /var/log/lastlog
40K     /var/log/lastlog
[root@LIN-HREL8 ~]# ls -lh /var/log/lastlog
-rw-rw-r--. 1 root utmp 327G Nov 21 14:06 /var/log/lastlog
[root@LIN-HREL8 ~]# df -h /var
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/rhel-var  5.0G  2.4G  2.7G  47% /var
linux/users_logs.1669036141.txt.gz · Last modified: 2022/11/21 14:09 by manu