I recently upgraded (ahem) some machines, and noticed a behavior
change in 'du'. I was wondering if this was intentional or a bug.
For example, on a RedHat 6.2/i386 based gnu/linux distribution,
'du --block-size=1 file' reports the size of 'file' in 1024-multiples if
the blocksize of the filesystem is 1024. This is with fileutils
versions 4.0p and 4.0t.
Is this a feature or a bug? Or rather: is the behavior intentional?
$ ls -la stamp-h
-rw-rw-r-- 1 bds bds 10 Jun 6 13:04 stamp-h
A 10 byte file.
$ du stamp-h
1 stamp-h
'stamp-h' eats up 1 block of the filesystem.
$ du -b stamp-h
1024 stamp-h
Claims stamp-h eats 1024 bytes. This is because it eats on block, and
on my filesystem every block is 1024 bytes.
$ du --block-size=1 stamp-h
1024 stamp-h
Does this claim that stamp-h eats 1024 blocks?
'du -b stamp-h' used to report '10'. This is the 'file size' rather
than the 'space occupied on the filesystem'.
I feel I need to mention this, with every report:
O/S: RedHat Linux 6.2
Kernel: Linux 2.2.14/i386
Libc: GNU libc 2.1.3
--
Kind regards,
Berend
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Berend De Schouwer, +27-11-712-1435, UCS