I have two devices /dev/sdc1 and /dev/sdc3.
/dev/sdc1 is mounted on / and /dev/sdc3 is mounted on /home.
The problem is that the device sdc1 is full whereas sdc3 has a lot of spare space. I want to determine where all that space on sdc1 gone (I suspect installed packages. a lot of them).
I tried to use du (and ncdu which makes this info more visual) but it calculates size of the whole tree (/home is nested on /) and I want to know only what's filling one of my devices. Is there a way to do that?
To clarify: I need some way to calculate usage of a device, not just exclude some subdirectories (which may be applicable in my situation, but I believe it can be more complex than that)
du -hs * | sort -rh. You can drill it down from there.du| sortwithdu -h. The-hallows the unit to vary, so you can end up with a 10tb file/directory in the middle of couple a kb ones.sorthas a-h(which @SatoKatsura used) option to sort human readable numbers, exactly for this.du -ks * | sort -rn, but the output is less readable.