get actual size of sparse file

You can see the actual size of a sparse file vs. the apparent size.

# ls -l /var/log/lastlog
-rw-rw-r-- 1 root utmp 684182572 Oct 24 16:56 /var/log/lastlog
# du --apparent-size /var/log/lastlog
668148  /var/log/lastlog
# du -h /var/log/lastlog 
48K     /var/log/lastlog
# ls -ls /var/log/lastlog 
48 -rw-rw-r-- 1 root utmp 684182572 Oct 24 16:56 /var/log/lastlog
share:

Leave a Reply

Your email address will not be published. Required fields are marked *