How to re-create faillog and lastlog so that backup software sees a smaller file?

Solution Verified - Updated -

Issue

  • Is it possible to re-create the sparse files /var/log/faillog and /var/log/lastlog, so that the size may go down.

  • Many backup applications don't treat sparse files as it is, and copy it as normal files onto the destination.

  • For example, IBM TSM treat sparse files as normal files while copying.

  • In cases were the nfsnobody ID is a high value, the sparse files /var/log/lastlog and /var/log/faillog can appear to be very large, when listed using 'ls -l'.

NOTE : ls -s should show the actual size since it prints the output according to the blocks used.

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content