du -hs to find out how big my
/home/user directory was and it reported as 18G. I cleared out almost 4G of data and ran
du -hs again to find out how much space I actually saved and it still reports as 18G.
--apparent-size makes it report as 19G. What am I doing wrong?
If the files are still in use,
Here's a post with an exercise so you can see this in action : (for BSD, but it's equivalent in Linux)
Another possibility that can cause this is filesystem compression and utilities that don't know about it. I saw this with ZFS a few years ago on Solaris but the theory should be the same for Ubuntu and any other filesystem that supports compression.
I created a file with
If the 4GB you cleared out was found with
This could be caused by hard links which means that the files you deleted still exist under other names. To find them, run