Bug 407177 - Folder size differs from "du -h"
Summary: Folder size differs from "du -h"
Status: REPORTED
Alias: None
Product: filelight
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Sandsmark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-03 09:27 UTC by Frederik Schwarzer
Modified: 2024-07-09 13:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
screen shot showing the differing results (265.45 KB, image/png)
2019-05-03 09:27 UTC, Frederik Schwarzer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frederik Schwarzer 2019-05-03 09:27:51 UTC
Created attachment 119809 [details]
screen shot showing the differing results

SUMMARY
The folder size of a boot2Qt folder is calculated differently from "du -h" as shown in the screen shot.

STEPS TO REPRODUCE
1. Open folder in Filelight
2. Open same folder in Konsole
3. Run "du -h ." and compare the two numbers

OBSERVED RESULT
The calculates sizes differ.

SOFTWARE/OS VERSIONS
KDE Frameworks Version: 5.44.0
Qt Version: 5.9.5
Comment 1 Frederik Schwarzer 2019-05-03 10:26:26 UTC
Dolphin (right-click -> Properties) agrees approximately with "du -h ."
Comment 2 hancerli 2021-05-16 18:53:59 UTC
Hi there,

Thanks for reporting the bug.

I tested this one with more than 10 different folders (to see if somehow the length of the folder name meddles with the size calculation) but couldn't see that happening. Every time it worked correctly.

Can you still reproduce it? Or maybe it's been resolved?
Comment 3 Frederik Schwarzer 2021-05-16 21:29:49 UTC
Hi,

I suspect it has something to do with how the boot2qt folder is arranged. Maybe symlinks or hardlinks ... or maybe loads of small files or so.

I cannot see it on "normal folders" but I am also not in a position to build a boot2qt image anymore for three reasons.
1. I run Arch now which is not a supported Linux distro for boot2qt (and it fails to build)
2. my current computer has an N5000 CPU with which a boot2qt build will probably run two weeks
3. that computer also only has 250G hard disk space, so I am quite low on free space with my normal system already

So if you happen to sit on a Debian/Ubuntu box with a big CPU and some 100G free hard disk space, you could try a boot2qt build and check that folder?

These instructions should still work:
$> git clone git://code.qt.io/yocto/meta-boot2qt.git
$> cd meta-boot2qt

$> git checkout v5.15.4-lts
$> ./b2qt-init-build-env init --device raspberrypi3

$> export MACHINE=raspberrypi3
$> source setup-environment.sh

$> bitbake -s
$> bitbake b2qt-embedded-qt5-image
$> bitbake meta-toolchain-b2qt-embedded-qt5-sdk

The last two commands will take their time.

Sorry that I cannot be of more help here.
Comment 4 hancerli 2021-05-17 05:36:45 UTC
Thanks, I'll try that out.
Comment 5 hancerli 2021-05-17 07:05:30 UTC
Tried but cannot reproduce it. "du -hs" and filelight both report very similar size info. There're minor differences which I assume caused by GiB - GB difference.

Could it be related to a previous version?