Why Lastlog files are getting bigger

Source: Internet
Author: User

The Lastlog file is the information that records the last login for all users.

The algorithm for this file is this:

Log user logon Information size = UID * 256byte

For example, a nfsnobody user on a 64-bit system with a UID of 4294967294 or 2^32-2, which is also the last UID on the system.

So the above algorithm can explain how the file displays the 1.2TB size:

4294967294 * 256 = 1099511627264 bytes from the above algorithm can also see that 256 is the amount of space each UID occupies in the Lostlog file. So this file is called a sparse (sparse) file: A sparse file is a lot of space left in the file to keep the data inserted for future use. These free spaces are occupied by the null characters of the ASCII code, and the space is quite large, which is called a sparse file, but does not allocate the appropriate disk block. That is, the file system space is not really occupied. So you don't have to worry about it. This file takes up 1.2TB of space. You can use Du-h/var/log/lastlog to find out what he sees that really takes up disk space.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.