22 May
2021
22 May
'21
12:20 a.m.
On Thu, 20 May 2021, Eirik Rye wrote:
I noticed that
ls -sreported a completely different size todu, but similar to what dovecot reports:ls -s | head -1
total 14099016
du
7050436 .
I assume there are some sparseness or block size related shenanigans going on here instead, causing differences in reported physical usage by
du(syscallnewfstatat()) compared tols(syscalllstat()) and dovecot.
You'll note the ratio between then is almost exactly 2. Some utilities report space usage in 512-byte block, some in K. I would hazard a guess that 'ls -s' is reporting in blocks, not K.
The man page for my OS 's'ls' states exactly that -- counts are in blocks.
Joseph Tam <jtam.home@gmail.com>