好奇,查了下,
https://linux.die.net/man/8/lastlog,发现了这段话:
Note
The lastlog file is a database which contains info on the last login of each user. You should not rotate it. It is a sparse file, so its size on the disk is usually much smaller than the one shown by "ls -l" (which can indicate a really big file if you have in passwd users with a high UID). You can display its real size with "ls -s".
【 在 ttaudi (ttaudi) 的大作中提到: 】
: 昨晚半夜迁移系统,用rsync之后发现原本24G的系统盘,同步之后变成42G。检查了一下发现是/var/log/lastlog的影响,du出来是一个300K的东西,但是同步出来的有20G。以为是rsync不是和迁移系统,然后改用tar,今天早上起来发现tar出来的也有这个问题。请问各位大佬们有遇
: # du -hs /var/log/lastlog
: 300K /var/log/lastlog
: ...................
--
FROM 117.173.136.*