From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.8 Description of problem: du -h gives the output in KB where it should be MB on the lastlog file. Eg: [root@homer log]# ll lastlog -r-------- 1 root root 19136220 jun 16 06:34 lastlog [root@homer log]# ll -h lastlog -r-------- 1 root root 19M jun 16 06:34 lastlog [root@homer log]# du -h lastlog 21K lastlog Same problem on RedHat 9 (i386): [root@superpc log]$ rpm -qf /usr/bin/du coreutils-4.5.3-19.0.2 [root@superpc root]# cd /var/log [root@superpc log]# ll lastlog -r-------- 1 root root 19136220 jun 16 09:45 lastlog [root@superpc log]# ll -h lastlog -r-------- 1 root root 18M jun 16 09:45 lastlog [root@superpc log]# du -h lastlog 23K lastlog -> Problem doesn't occurs on other files bigger than 1MB. -> Problem doesn't exists on RedHat 7.0 [greggy@mission-control greggy]$ rpm -qf /usr/bin/du fileutils-4.0x-3.1 [greggy@mission-control greggy]$ cat /etc/redhat-release Red Hat Linux release 7.0 (Guinness) Version-Release number of selected component (if applicable): coreutils-5.2.1-7 How reproducible: Always Steps to Reproduce: 1. execute du -h on /var/log/lastlog Actual Results: Output shows K (kilobytes) Expected Results: K should be M (megabytes) Additional info: lastlog seems to be the only file for which the du output is not correct. Renaming the file doesn't solve the problem.
It's a sparse file, and du is telling the truth: it really does only take up that much disk space. The file is largely zeros, and the filesystem has an efficient way of representing that.